mirror of
https://github.com/mandiant/capa.git
synced 2025-12-12 15:49:46 -08:00
fixes 462, default to empty string when accessing rule path stored in ida_settings
This commit is contained in:
@@ -1143,14 +1143,14 @@ class CapaExplorerForm(idaapi.PluginForm):
|
||||
"""create Qt dialog to ask user for a directory"""
|
||||
return str(
|
||||
QtWidgets.QFileDialog.getExistingDirectory(
|
||||
self.parent, "Please select a capa rules directory", settings.user["rule_path"]
|
||||
self.parent, "Please select a capa rules directory", settings.user.get("rule_path", "")
|
||||
)
|
||||
)
|
||||
|
||||
def ask_user_capa_rule_file(self):
|
||||
""" """
|
||||
return QtWidgets.QFileDialog.getSaveFileName(
|
||||
None, "Please select a capa rule to edit", settings.user["rule_path"], "*.yml"
|
||||
None, "Please select a capa rule to edit", settings.user.get("rule_path", ""), "*.yml"
|
||||
)[0]
|
||||
|
||||
def slot_change_rule_scope(self):
|
||||
|
||||
Reference in New Issue
Block a user