Skip to content
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

Incorrectly resolves symlinks #15

Closed
SolitudeSF opened this issue Jun 16, 2019 · 7 comments
Closed

Incorrectly resolves symlinks #15

SolitudeSF opened this issue Jun 16, 2019 · 7 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@SolitudeSF
Copy link

Symlinks that point to another disk are still counted for current one, resulting in total disk usage bigger than the disk capacity.

@Byron Byron added enhancement New feature or request help wanted Extra attention is needed labels Jun 17, 2019
@Byron
Copy link
Owner

Byron commented Jun 17, 2019

Right now there is no special handling of symbolic links, and counting them at all as the files they point to is something I would want to avoid in future. Right now DUA relies on the file metadata provided by the metadata() call of the Rust std, which follows symbolic links.

ghost pushed a commit that referenced this issue Jun 17, 2019
@vks
Copy link
Contributor

vks commented Jul 24, 2019

I think this is very dangerous, because recursive deleting may follow the links, possibly deleting the whole home folder.

@ghost
Copy link

ghost commented Jul 25, 2019

Indeed, traversal follows symlinks. Additionally, symlinks are not currently displayed as such and appear like real files. The latter can certainly be fixed during display, as a first step towards making it more clear what's going on. Not following symlinks at all would require a change in the jwalk create I believe.

However, when deleting files and directories, dua will not follow symbolic links and behave as one would expect. This fix was introduced in v2.1.9.

@vks
Copy link
Contributor

vks commented Jul 25, 2019

Not following symlinks at all would require a change in the jwalk create I believe.

That is true, but I think it only applies to the non-interactive mode of dua.

However, when deleting files and directories, dua will not follow symbolic links and behave as one would expect. This fix was introduced in v2.1.9.

I think the fix was not correct, see #27.

@vks
Copy link
Contributor

vks commented Jul 25, 2019

Also see Byron/jwalk#7.

@vks
Copy link
Contributor

vks commented Jul 29, 2019

This issue should be fixed now for the interactive mode, for the aggregate mode this needs to be fixed in jwalk first.

@Byron
Copy link
Owner

Byron commented Jul 6, 2020

As symbolic links are not followed, this issue should.

There is still a special case which is dua or dua *, which is when it ignores top-level symbolic links entirely. That can be confusing, as one would still expect them to show up like any other symbolic link. If this is an issue, a new one could be opened for that alone.

Thank you

@Byron Byron closed this as completed Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants