From 95b4c55ea26e6fb69af55acf6bc94dddacab9055 Mon Sep 17 00:00:00 2001 From: Willi Ballenthin Date: Wed, 9 Sep 2020 10:36:48 -0600 Subject: [PATCH] ida plugin: don't use rule path settings if the path doesn't exist closes #298 --- capa/ida/plugin/form.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/capa/ida/plugin/form.py b/capa/ida/plugin/form.py index 1d325281..85046cb1 100644 --- a/capa/ida/plugin/form.py +++ b/capa/ida/plugin/form.py @@ -333,7 +333,7 @@ class CapaExplorerForm(idaapi.PluginForm): # resolve rules directory - check self and settings first, then ask user if not self.rule_path: - if "rule_path" in settings: + if "rule_path" in settings and os.path.exists(settings["rule_path"]): self.rule_path = settings["rule_path"] else: rule_path = self.ask_user_directory()