sahib / rmlint

Extremely fast tool to remove duplicates and other lint from your filesystem
http://rmlint.rtfd.org
GNU General Public License v3.0
1.86k stars 128 forks source link

Incorrect escaping of paths with spaces in generated shell script #574

Closed gbonacini closed 1 year ago

gbonacini commented 2 years ago

Hi,

I have a lot of errors related to path containing spaces, in the generated shell script.

This is a sample (note the space between "TRUST" and "64", the following command interprets the path as two parameters): -------------------------- START SAMPLE ------------------------------- [ 6%] Deleting: /USB/Orig/_Backups/_Backups_archivio/_Backup_desktop_asus/_NEW/TRUST 64/doc/CHSHLLVX.HTM ls: cannot access '/USB/Orig/_Backups/_Backups_archivio/_Backup_desktop_asus/_NEW/TRUST': No such file or directory ls: cannot access '64/doc': No such file or directory rmdir: failed to remove '/USB/Orig/_Backups/_Backups_archivio/_Backup_desktop_asus/_NEW/TRUST 64/doc': Directory not empty ls: cannot access '/USB/Orig/_Backups/_Backups_archivio/_Backup_desktop_asus/_NEW/TRUST': No such file or directory ls: cannot access '64': No such file or directory rmdir: failed to remove '/USB/Orig/_Backups/_Backups_archivio/_Backup_desktop_asus/_NEW/TRUST 64': Directory not empty -------------------------- END SAMPLE -------------------------------

This is the version (the program came from Ubuntu 18 LTS package manager):

"version 2.6.1 compiled: Jul 30 2017 at [23:44:43] "Penetrating Pineapple" (rev 1) compiled with: +mounts +nonstripped +fiemap +sha512 +bigfiles +intl +replay +xattr +btrfs-support

rmlint was written by Christopher Pahl and Daniel Thomas. The code at https://github.com/sahib/rmlint is licensed under the terms of the GPLv3."

Kind regards

cebtenzzre commented 2 years ago

Duplicate of #241. This was fixed in v2.9.0 released August 2019, so please update. You could try rmlint_2.9.0-2.3_amd64.deb from here but it may not be compatible with your version of Ubuntu. You can always compile from source to get the latest version.