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

GUI file selections not matching generated script #601

Open cstaahl opened 1 year ago

cstaahl commented 1 year ago

Hi everyone,

thank you for a really useful application. Having used fslint in the past and clonespy on Windows, I really appreciate the speed of this implementation.

I am experiencing an issue with the selection of files to keep/remove in the GUI and the resulting script. I don't know if it is related to https://github.com/sahib/rmlint/issues/375 and https://github.com/sahib/rmlint/issues/385 because they should be fixed and I have compiled the latest version from the development branch. See my screenshots of GUI selections and the resulting script below.

Default selection: Default Selection

Resulting generated code:

original_cmd  '/home/christian/rmlint_test/original' # original
remove_cmd    '/home/christian/rmlint_test/copy_01' '/home/christian/rmlint_test/original' # duplicate

The expected result would have been:

original_cmd  '/home/christian/rmlint_test/original' # original
remove_cmd    '/home/christian/rmlint_test/copy_01' '/home/christian/rmlint_test/original' # duplicate
remove_cmd    '/home/christian/rmlint_test/copy_02' '/home/christian/rmlint_test/original' # duplicate

Changing the selection Toggled Selection all and the option for script generation from all to selected Toggled selection selected does not change the resulting auto generated script.

OS: Ubuntu 22.04.1 LTS (Jammy Jellyfish) rmlint: 58d29ec1fbc6fae7359202778e148e3f3b096b88 compiled from source

version 2.10.1 compiled: Dec 21 2022 at [10:21:11] "Ludicrous Lemur" (rev 58d29ec1)
compiled with: +mounts +nonstripped +fiemap +sha512 +bigfiles +intl +xattr +btrfs-support

What am I missing / doing wrong?

cebtenzzre commented 1 year ago

375 is about highlighting entries and not which ones are marked as originals, and #385 says nothing about the initial selection not matching the output. Looks like a new bug, possibly a regression on develop.

cstaahl commented 1 year ago

I've tried previous releases with slightly different but still incorrect results: 2.10.1: 2a4443d1b8129736adee5edc354e80e5f12be598 2.10.0: 93b62498023674ef55422a87b4c6c74e5beaa903

The initial output is now

original_cmd  '/home/christian/rmlint_test/original' # original
remove_cmd    '/home/christian/rmlint_test/copy_01' '/home/christian/rmlint_test/original' # duplicate
remove_cmd    '/home/christian/rmlint_test/copy_02' '/home/christian/rmlint_test/original' # duplicate

which does match the default setting of check marks and crosses. However toggling the check marks and crosses has no effect.

If i change the selection of the files like this: Alternate selection

it does change the output to:

original_cmd  '/home/christian/rmlint_test/original' # original
remove_cmd    '/home/christian/rmlint_test/copy_02' '/home/christian/rmlint_test/original' # duplicate 

whereas I would have expected:

original_cmd  '/home/christian/rmlint_test/copy_02' # original
remove_cmd    '/home/christian/rmlint_test/original' '/home/christian/rmlint_test/copy_02' # duplicate
nathhad commented 1 year ago

Can confirm I see what appears to be this same issue on prepackaged version 2.9.0 from Debian repos. Same as above, I can change which packages are selected for removal in the gui without getting a corresponding change in the generated script.

Thanks!