Canop / broot

A new way to see and navigate directory trees : https://dystroy.org/broot
MIT License
10.35k stars 226 forks source link

broot fail to recognize `suid` and `sgid` bits when showing permission #863

Closed Jisu-Woniu closed 3 months ago

Jisu-Woniu commented 3 months ago

This is a comparison between broot and lsd, both showing the same file mount.cifs, which has permission rwsr-sr-x:

comparison between `broot` and `lsd`

The two s in permission means setuid and setgid respectively, but broot does not recognize those bit and only shows x instead.

Jisu-Woniu commented 3 months ago

I think this is the code involved:

https://github.com/Canop/broot/blob/df315d6b11a74b289c5276e741b854c0d47738ae/src/display/permissions.rs#L63-L67

The has_extra method can check the correspond permission.

Canop commented 3 months ago

Yes. As you searched til the umask crate, you may as well make a PR, right ?