diff options
author | Nate Buttke <nate-web@riseup.net> | 2023-08-31 15:06:48 -0700 |
---|---|---|
committer | Nate Buttke <nate-web@riseup.net> | 2023-08-31 15:06:48 -0700 |
commit | 17fa3b47ab547110b259a3c7ed4f4c5471c46587 (patch) | |
tree | 356c5424b904b28aee44b4d8e9cc18d68cf94c52 | |
parent | 8abc176c440499a4de8406fd58b7d2c0a4e5b9ff (diff) |
-rw-r--r-- | server.py | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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: |