Noticed on my Samsung Galaxy device some directories were not being recognized as directories in the explorer. They have different modes, such as 17913 so they aren't equal to 0o40000 even after subtracting the 0o777 to remove the perms. Looked around and found the header file containing the macros used by commands such as stat: stat.h.
Just updated the logic of isDir to use the bit mask like stat does to capture directories with other flags set. Also updated the formatPermissionMode in the same way and added l for symlinks
Noticed on my Samsung Galaxy device some directories were not being recognized as directories in the explorer. They have different modes, such as 17913 so they aren't equal to 0o40000 even after subtracting the 0o777 to remove the perms. Looked around and found the header file containing the macros used by commands such as stat: stat.h.
Just updated the logic of
isDir
to use the bit mask like stat does to capture directories with other flags set. Also updated theformatPermissionMode
in the same way and addedl
for symlinks