Merge pull request #2460 from mandiant/fix/idaexplorersave

fix bug preventing save of capa results
This commit is contained in:
Moritz
2024-10-14 07:24:00 +02:00
committed by GitHub
2 changed files with 11 additions and 2 deletions

View File

@@ -19,6 +19,8 @@
### capa Explorer IDA Pro plugin
- fix bug preventing saving of capa results via Save button @mr-tz
### Development
### Raw diffs

View File

@@ -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):