dotter icon indicating copy to clipboard operation
dotter copied to clipboard

[BUG] Dotter depends on configuration too much when undeploying

Open SuperCuber opened this issue 3 years ago • 4 comments

Reproduction

  • Deploy with symlink a -> b.
  • Remove the file a
  • Run an undeploy

Expected behavior

b should be deleted

Actual behavior

[ERROR] Failed to undeploy
Caused by:
    get a configuration
    expand files that are directories
    expand file "a"
    read file's metadata
    The system cannot find the file specified. (os error 2)

SuperCuber avatar Mar 10 '21 17:03 SuperCuber

I think I'm running into this issue. I deleted a directory in the dotter repo, and now it's giving me a bunch of these errors:

[ERROR] Failed to delete symlink "ranger/plugins/devicons2/screenshot.png" -> "/home/cassidy/.config/ranger/plugins/devicons2/screenshot.png"
Caused by:
    detect symlink's current state
    get real path of source
    No such file or directory (os error 2)

poperigby avatar Jul 14 '21 02:07 poperigby

I've opened a PR which should fix your issue, @lumbo7332. It doesn't quite tackle the core problem of this issue, which seems to be that Dotter config entries which point to nonexistent files cause hard errors rather than warnings, but if you delete a file or directory and remove the corresponding config entries, Dotter should no longer crash because the still-existing symlinks are broken.

Diomendius avatar Oct 18 '21 12:10 Diomendius

I think this could be closed as #87 has been merged, correct?

CanRau avatar Jan 23 '24 16:01 CanRau

@CanRau IIRC the fix only works for one of the platforms. I need to revisit this 🙃

SuperCuber avatar Feb 17 '24 15:02 SuperCuber