* fix: dir_walker interrupted error
Ignore and continue if we get many interrupted errors instead of
panicing on 3.
This is from user feedback who reported occasional panics from too many
interrupted errors
https://github.com/bootandy/dust/issues/495#issuecomment-3026673312
* Revert "fix: dir_walker interrupted error"
This reverts commit 84fa0ea9a4.
* fix: interrupted error, set limit to 999 instead.
* fix: Limit file size based on the file system I/O block size
* fix: Take possible file pre-allocation into account
* refactor: Reduce indenting with early return
* refactor: Fix clippy::manual_div_ceil
* fix: Use target_size instead of max_size
* fix: Take possible pre-allocation for a file into account
https://github.com/bootandy/dust/pull/487#issuecomment-2816885444
Previously, we attempted to perform a clean shutdown, which could take a
significant period of time on slow filesystems. This commit changes the
shutdown logic to abort immedietly when ^C is received by the program.
If we run `dust /usr/*/Trash`
We see several 'Trash' directories in the output but do not know which
user they belong to.
This fix means if we see duplicate names in a directory we will display
the parent directory name as well
Before we calculated the % by taking the longest bar. If you use
--skip-total the longest bar is not the total. We need to sum up all the
children of root to work out what the largest size is.
Previously, the function get_metadata in platform.rs used `fs::metadata` which follows symbolic links
and returns metadata for the target file. This caused issues #421: du / dust disagreement
when trying to determine properties of the symbolic link itself
This PR addresses an issue where `target_dirs` were being optimized out\
before being passed to the `get_filesystem_devices()` function.
The changes in this PR ensure that `target_dirs` are passed directly
to `get_filesystem_devices()`, and only then are they simplified.
Example of a command that currently doesn't work correctly:
```sh
dust -x $(findmnt -S tmpfs -o target -n)
```
It should show the usage of all tmpfs mounts, but it currently shows
just the the root mountpoints like `/run`, since all the mountpoints
nested under it are optimized out.