Code Monkey home page Code Monkey logo

Comments (8)

 avatar commented on May 26, 2024

I am very sorry to hear that dua did indeed eat your laundry :(! What an oversight, and clearly a result of me being sloppy and trying to save time by not writing crucial tests.

Please update to the latest version, v2.1.8, which doesn't follow symbolic links to directories anymore.

from dua-cli.

vks avatar vks commented on May 26, 2024

I believe there is still something wrong, as I just had dua delete files I did not intend to delete.

from dua-cli.

crides avatar crides commented on May 26, 2024

Can you provide more details? Are the files you don't want to delete also symlinks to folders/files?

from dua-cli.

 avatar commented on May 26, 2024

@vks I absolutely agree, dua must not follow symlinks when deleting files. However, this was fixed in the latest version, and thus it's most important for us to learn which version you were effectively using. If that is indeed the latest one, I would hope you can provide a reproducible example so this (possibly new) issue can be fixed ASAP.
Thank you.

from dua-cli.

vks avatar vks commented on May 26, 2024

I was using a very recent version from my pull request yesterday (3baf7f3 plus updated dependencies).

I still need to investigate what exactly happened and whether I can reproduce it, but dua certainly deleted many more files than I marked. I suspect it is related to symlinks, but it could be something else.

from dua-cli.

vks avatar vks commented on May 26, 2024

After further investigation, I don't think that this was ever fixed correctly. Currently, dua uses path.metadata() when deleting recursively, for which is_symlink always returns false! std::fs::symlink_metadata should be used instead.

from dua-cli.

crides avatar crides commented on May 26, 2024

I hope this is really fixed in 2.1.11, as 2.1.9 ate my stuff again. And it's much worse this time.

from dua-cli.

vks avatar vks commented on May 26, 2024

@crides I believe it is fixed now, but please look at the code yourself. It uses symlink_metadata instead of metadata, so symlink detection should work now.

from dua-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.