From 37a39e82e2882a6e68a6debcaeaf1f3aceabbd90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 1 Sep 2016 13:17:09 +0200 Subject: [PATCH] path_in_location needs to use sanitized entry --- src/octoprint/filemanager/storage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)