path_in_location needs to use sanitized entry

This commit is contained in:
Gina Häußge 2016-09-01 13:17:09 +02:00
parent c552c614b2
commit 37a39e82e2

View file

@ -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)