summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/server.py b/server.py
index cd27865..677f266 100644
--- a/server.py
+++ b/server.py
@@ -1,4 +1,3 @@
-from collections import defaultdict
import os
import sys
from pathlib import PurePosixPath
@@ -105,14 +104,13 @@ def check_path(path, dirstructure):
kids = list(subdict["children"].keys())
return True, str(ftype), kids
else:
+ found = False
for c in components[1:]:
if c in subdict["children"]:
found = True
subdict = subdict["children"].get(c)
ftype = subdict["filetype"]
kids = list(subdict["children"].keys()) if ftype == 'dir' else None
- else:
- found = False
if found:
return found, str(ftype), kids
else: