-
-
Notifications
You must be signed in to change notification settings - Fork 660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flag/colour for directory which is a btrfs subvolume #434
Comments
Upon further investigation, it's the inode number which signifies a subvolume, so I can see them by using |
I have started work on this in https://github.com/daviessm/exa/tree/issue_434_subvolumes - it correctly detects subvolumes by ino as described above, but needs to also check that the filesystem type is btrfs. This can be done with |
Hi there, and sorry for not leaving a reply until now. I've looked at your code, and it all looks good. If detecting a subvolume really is as easy as checking the inode, then I'll be happy to merge it in. |
No worries, yes it is that simple - but obviously this will only apply if the volume the directory is on is actually btrfs - otherwise there's a remote possibility of false positives (where the inode number of a directory just happens to be 2 or 256). I haven't figured out yet how to check that. |
Aaah, you’re right, I missed that bit. Running What about if it checked the inode first, and then only ran |
I think that's what I'd do, yeah. However it's beyond my Rust skills at the moment so I'll do it when I get around to it later unless you want to pick it up first. I was also thinking about caching all the |
New PR: #941 |
Would it be possible to flag a directory which is a subvolume in the
btrfs
filesystem? These directories have an inode type of 2 or 256 when the filesystem type is btrfs: https://stackoverflow.com/a/32865333/5293556I wouldn't mind whether a character other than
d
or a different colour was used for these, it would just be nice to see them.The text was updated successfully, but these errors were encountered: