mirror of
https://github.com/flipperdevices/flipperzero-firmware.git
synced 2025-12-12 12:51:22 +04:00
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.
This commit is contained in:
@@ -323,7 +323,7 @@ class FlipperStorage:
|
|||||||
return False
|
return False
|
||||||
raise FlipperStorageException.from_error_code(path, error_code)
|
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):
|
def exist_file(self, path: str):
|
||||||
"""Does file exist on Flipper"""
|
"""Does file exist on Flipper"""
|
||||||
|
|||||||
Reference in New Issue
Block a user