diff options
author | Anthony Wang | 2024-07-27 18:53:44 -0500 |
---|---|---|
committer | Anthony Wang | 2024-07-27 18:53:44 -0500 |
commit | 59641e75d47e4186a2fec0e5d2c16116d2471090 (patch) | |
tree | 00f711751205d9a5bc2e4f7af40469ebd714c5e7 | |
parent | e452bb52fc2f34a8b26c993cb5049f4db49661d3 (diff) |
Skip nonexistent files when indexing
-rw-r--r-- | server.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -71,8 +71,8 @@ class EventHandler(FileSystemEventHandler): def index(path, parent): - if os.path.basename(path).startswith("."): - # Skip hidden files + if not os.path.exists(path) or os.path.basename(path).startswith("."): + # Skip nonexistent or hidden files return print("Indexing", path, parent) |