|
|
|
|
@ -74,7 +74,9 @@ def getFolderJSON(subpath = ''):
|
|
|
|
|
|
|
|
|
|
# validate input |
|
|
|
|
if re.search('\.\.', subpath) or not os.path.exists(full_path): |
|
|
|
|
errors.append('invalid path?: {}'.format(full_path)) |
|
|
|
|
errors.append('invalid path: {}'.format(full_path)) |
|
|
|
|
elif not os.path.isdir(full_path): |
|
|
|
|
errors.append('path is not a directory: {}'.format(full_path)) |
|
|
|
|
else: |
|
|
|
|
for entry in os.scandir(full_path): |
|
|
|
|
# TODO: remove 'getPathInfo()' when finished with async file listing |
|
|
|
|
|