Skip to content

Commit

Permalink
Fix storage.py exist_dir logic (flipperdevices#2639)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
perryprog authored May 7, 2023
1 parent 914129a commit 954780e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/flipper/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def exist_dir(self, path: str):
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"""
Expand Down

0 comments on commit 954780e

Please sign in to comment.