Fix bug discovered by Will Ashford (who also gracefully provided a simple fix): if an application that isn't present on the computer is listed under 'Applications Not Logged', then no keystrokes whatsoever would be recorded, since an exception gets thrown every time.
diff --git a/logwriter.py b/logwriter.py
index b2b5c62..79611e3 100644
--- a/logwriter.py
+++ b/logwriter.py
@@ -269,7 +269,7 @@ class LogWriter(threading.Thread):
self.processName = self.GetProcessName(event)
if self.settings['General']['Applications Not Logged'] != 'None':
for path in self.settings['General']['Applications Not Logged'].split(';'):
- if os.stat(path) == os.stat(self.processName): #we use os.stat instead of comparing strings due to multiple possible representations of a path
+ if os.path.exists(path) and os.stat(path) == os.stat(self.processName): #we use os.stat instead of comparing strings due to multiple possible representations of a path
return False
return True