Closed matthiaskrgr closed 8 years ago
This should be fixed now in master, I was missing an error print :) Thanks for reporting.
It seems this is not really the full fix. If scanning recursively and any file is inaccessible, duperemove just stops the directory scan on that folder and exits - at least printing a message now. Example:
root@alien17 ~ # duperemove -d -r -h -v /home/olifre
- lots of chatter -
Skipping small file /home/olifre/.gtkpod/prefs
Error 13: Permission denied while getting path to file /home/olifre/.gvfs. Skipping.
root@alien17 ~ # echo $?
1
i.e. the message says "Skipping" but indeed duperemove is not just skipping, but fatalling out instead since a single path in the recursive scan is inaccessible (gvfs in this case). It should really skip instead and just ignore this single path.
Ok I see where we were going wrong. I believe I fixed this in master, would you mind giving it a spin please?
That was fast - and fixes it! Now it works as expected, for sake of example:
# duperemove -d -r -h /home/olifre/.gem/ /home/olifre/.gvfs
Using 128K blocks
Using hash: murmur3
Error 13: Permission denied while getting path to file /home/olifre/.gvfs. Skipping.
Using 8 threads for file hashing phase
...
Thanks a lot - finally I can just throw my full home-directory (or maybe the full FS) into duperemove again.
Great, I'll close then feel free to comment/reopen if you find further issues with this. Thanks to both of you for pointing this out :)
when passing to duperemove a file or directory name which does not exist, duperemove will just "silently" fail, print,
and give a bad exit status bot nothing more.
Took me a while to realize the directory path I specified was wrong, but an error message like "could not find file or directory: x" would have been quite helpful. :) (especially when you pass 10-20 directories to it and don't want to search every single one for a type)