diff --git a/src/octoprint/filemanager/storage.py b/src/octoprint/filemanager/storage.py index 1c11f42c..2d595f54 100644 --- a/src/octoprint/filemanager/storage.py +++ b/src/octoprint/filemanager/storage.py @@ -511,7 +511,7 @@ class LocalFileStorage(StorageInterface): filepath = self.sanitize_path(filepath) path = self.sanitize_path(path) - return filepath.startswith(path) + return filepath == path or filepath.startswith(path + "/") def file_exists(self, path): path, name = self.sanitize(path)