mirror of
https://github.com/mandiant/capa.git
synced 2025-12-12 07:40:38 -08:00
Merge pull request #2460 from mandiant/fix/idaexplorersave
fix bug preventing save of capa results
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
|
||||
### capa Explorer IDA Pro plugin
|
||||
|
||||
- fix bug preventing saving of capa results via Save button @mr-tz
|
||||
|
||||
### Development
|
||||
|
||||
### Raw diffs
|
||||
|
||||
@@ -1309,10 +1309,17 @@ class CapaExplorerForm(idaapi.PluginForm):
|
||||
|
||||
s = self.resdoc_cache.model_dump_json().encode("utf-8")
|
||||
|
||||
path = Path(self.ask_user_capa_json_file())
|
||||
if not path.exists():
|
||||
path = self.ask_user_capa_json_file()
|
||||
if not path:
|
||||
# dialog canceled
|
||||
return
|
||||
|
||||
path = Path(path)
|
||||
if not path.parent.exists():
|
||||
logger.warning("Failed to save file: parent directory '%s' does not exist.", path.parent)
|
||||
return
|
||||
|
||||
logger.info("Saving capa results to %s.", path)
|
||||
write_file(path, s)
|
||||
|
||||
def save_function_analysis(self):
|
||||
|
||||
Reference in New Issue
Block a user