diff --git a/src/octoprint/filemanager/storage.py b/src/octoprint/filemanager/storage.py index 1a67a1f6..490ced2f 100644 --- a/src/octoprint/filemanager/storage.py +++ b/src/octoprint/filemanager/storage.py @@ -1057,7 +1057,6 @@ class LocalFileStorage(StorageInterface): continue entry_path = os.path.join(path, entry) - path_in_location = entry if not base else base + entry sanitized = self.sanitize_name(entry) if sanitized != entry: @@ -1081,6 +1080,8 @@ class LocalFileStorage(StorageInterface): self._logger.exception("Error while trying to rename \"{}\" to \"{}\", ignoring file".format(entry_path, sanitized_path)) continue + path_in_location = entry if not base else base + entry + # file handling if os.path.isfile(entry_path): type_path = octoprint.filemanager.get_file_type(entry)