Open dsully opened 4 years ago
Lunux's du also don't cross boundaries. IDK what is the reasoning.
One of possible reasons -- to not fail to endless recursion from symlinks. Perhaps other reasons exist as well.
P.S. when I used du last time it crossed boundaries, but I definitely noticed code related to fs detection side du sources. But I am not 100% sure how du works, and lack experience with Linux/unix.
I tested on Linux. du -x
won't cross boundaries.
So I suggest dirstat-rs should also have -x
option, and skip other file systems only with that option.
If we want to be as consistent with du. If we want to preserve backward compatibility with dirstat-rs -- could go in opposite direction and us -X to allow passing boundaries.
I would prefer to make it compatible with du.
Other tools (such as dust) work across filesystem boundaries. Is there a reason dirstat-rs specifically does not?
I see in
lib.rs
:Commenting out those lines makes
ds
work as I would expect.Thanks