Skip to content

Commit

Permalink
Fix DoesFolderExist(path) bug if path ends in /
Browse files Browse the repository at this point in the history
  • Loading branch information
ydkhatri committed Sep 4, 2021
1 parent 5626f8c commit 41d2f5b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/helpers/apfs_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,8 @@ def DoesFileExist(self, path):

def DoesFolderExist(self, path):
'''Returns True if folder exists'''
if path != '/' and path.endswith('/'):
path = path[:-1]
apfs_file_meta = self.GetApfsFileMeta(path)
if apfs_file_meta:
return apfs_file_meta.item_type in (4, 10) # will also return true for symlink which may point to file!
Expand Down

0 comments on commit 41d2f5b

Please sign in to comment.