aboutsummaryrefslogtreecommitdiff
path: root/server.py
diff options
context:
space:
mode:
Diffstat (limited to 'server.py')
-rw-r--r--server.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/server.py b/server.py
index 7d33a66..6dd226d 100644
--- a/server.py
+++ b/server.py
@@ -29,8 +29,10 @@ con.commit()
def get_parent(path):
if path in watchdirs:
- return os.stat("/").st_ino
- return os.stat(pathlib.Path(path).parent).st_ino
+ parent = "/"
+ else:
+ parent = pathlib.Path(path).parent
+ return os.stat(parent).st_ino
class EventHandler(FileSystemEventHandler):