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

delete a duplicate that is deeper #3

Closed
whoizit opened this issue Jun 7, 2020 · 2 comments
Closed

delete a duplicate that is deeper #3

whoizit opened this issue Jun 7, 2020 · 2 comments
Assignees

Comments

@whoizit
Copy link

whoizit commented Jun 7, 2020

the current algorithm is deleted differently. But you should prefer to delete a duplicate that is deeper.
In my case, half the files were left in one directory, half in another.

$ rmd -drcvv /home/
Remove File: "/home/d/q/RDS MAX Natural/txt/Text/Text/5_Ustanovki_Maxa_dlya_perioda_spada.pdf" - freed 886.29 kb
Remove File: "/home/d/q/RDS MAX Natural/txt/Text/Text/4_Ustanovki_trudovoy_etiki_Maxa.pdf" - freed 928.14 kb
Remove File: "/home/d/q/RDS MAX Natural/txt/Text/Text/2_Ustanovki_Maxa_na_Igru.pdf" - freed 386.08 kb
Remove File: "/home/d/q/RDS MAX Natural/txt/3_Glavnye_ustanovki_Maxa.pdf" - freed 379.07 kb
Remove File: "/home/d/q/RDS MAX Natural/txt/6_Spisok_knig_ot_Maxa.pdf" - freed 5.34 Mb
Remove File: "/home/d/q/RDS MAX Natural/txt/1_Pervye_ustanovki_Maxa.pdf" - freed 397.25 kb

@FilippoRanza FilippoRanza self-assigned this Jun 8, 2020
@FilippoRanza
Copy link
Owner

I'm sorry for the mess. Probably I figured out which is the problem, the algorithm to recursively search files implements a BFS on the file system tree and it calls itself recursively as soon as it encounters a directory in the file listing. This naive implementation should be the cause of your issue. I'll fix it as soon as possible

@FilippoRanza
Copy link
Owner

Now the algorithm that search files implements a real breadth-first search, checking each file in a directory before moving into a subdirectory. This allows rmd to correctly identify deeper files as duplicates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants