made SafePath and ensured initital paths and move_paths have valid paths, and all filenames have to be found via os.walk so should be impossible to write to parts of the FS that are unsafe

This commit is contained in:
2023-02-03 16:57:39 +11:00
parent 4b1bbcb2bf
commit 2b478ed505
3 changed files with 78 additions and 36 deletions

View File

@@ -185,8 +185,8 @@ def SettingsMPath():
if not settings or settings.metadata_path == "":
print ("WARNING: no Settings for metadata path")
return
p=settings.metadata_path
if p[0] == '/':
return p
if settings.metadata_path[0] == '/':
path=settings.metadata_path
else:
return settings.base_path+p
path=settings.base_path+settings.metadata_path
return path