From 954780ed24c63adfdda153d88eddd4abb3a28c53 Mon Sep 17 00:00:00 2001 From: Perry Fraser Date: Sun, 7 May 2023 14:40:38 -0400 Subject: [PATCH] Fix storage.py exist_dir logic (#2639) * Fix storage.py exist_dir logic. This method would return true if the given path existed as either a directory or a file, which is what the plain exist method is for. --- scripts/flipper/storage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/flipper/storage.py b/scripts/flipper/storage.py index 9f6f5215..4640262b 100644 --- a/scripts/flipper/storage.py +++ b/scripts/flipper/storage.py @@ -323,7 +323,7 @@ class FlipperStorage: return False raise FlipperStorageException.from_error_code(path, error_code) - return True + return response == b"Directory" or response.startswith(b"Storage") def exist_file(self, path: str): """Does file exist on Flipper"""