pixelb / fslint

Linux file system lint checker/cleaner
314 stars 74 forks source link

I think there might be a bug in 'Select using wildcard' feature #161

Open gchaudri opened 5 years ago

gchaudri commented 5 years ago

I have a backups folder (/home/me/backups) and a 2nd hard drive (/media/me/disk) with a terabyte of duplicates.

  1. I do a right-click >> properties on my backups folder and get a count of say 200,000 files.
  2. I use the FSlint-GUI to find duplicates. I input '/media/*' as the 'Select using wildcard'
  3. When I hit delete, I get a warning because some of the duplicates exist as two copies only in the 2nd hard drive (/media/me/disk/folder/file.jpg and media/me/disk/folder/file_dupe.jpg).
  4. So I hit no to the warning and manually delete one duplicate then repeat the '/media/*' as the 'Select using wildcard'
  5. After I delete hundreds of thousands of duplicates in one click, I check my backups folder with a right-click >> properties. I now have 199,997 files.

So somehow 3 files vanished unexpectedly.

I'll try experimenting to see if I can get more specific steps to reproduce this issue.

Also, I'm not an expert in reading code, so I'll ask.... are there any unit tests in this project?

gchaudri commented 5 years ago

I think I've narrowed down the issue.

  1. Click on a file in the FSlint GUI after finding duplicates. The file should not be in the wildcard path we use later.
  2. Notice you cannot just click on the file again to un-select it.
  3. Now use the wildcard select in such a way that the file selected in 1. is not in this path
  4. Notice that the selection has also included the first file.

So I feel the user experience is a bit confusing. It's not clear that there was already a selection made before the wildcard search is added on top of the un-intended selection. I appreciate this might not be considered a bug.