DeviceFarmer / stf

Control and manage Android devices from your browser.
https://devicefarmer.github.io
Other
3.52k stars 497 forks source link

Explorer directory fix #670

Closed tyopoyt closed 1 year ago

tyopoyt commented 1 year ago

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