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.87k stars 130 forks source link

fix issue #385 #465

Closed s-rogonov closed 3 years ago

s-rogonov commented 3 years ago

I hope I find a solution of the issue #385.

current behavior:

  1. reads json properties
  2. overwrites "is_original" prop to first-in-the-duplicate group

suggested behavior:

  1. reads json properties
  2. keeps "is_original" prop unchanged (due to gui "shredder" overwrites it to save manually toggled files)
SeeSpotRun commented 3 years ago

Unfortunately this is causing this test to fail: https://github.com/sahib/rmlint/blob/develop/tests/test_options/test_replay.py#L128-L149

Basically for command-line users, sometimes it's useful to re-run but with different (automated) ranking of originals. Your proposed change breaks this.

A workaround might be to add an option -S j to rank originals based on their prior ranking in the json file. Although it gets a bit messy if new files are added between runs (or go missing).

SeeSpotRun commented 3 years ago

Underlying issue should be addressed by #482.

New option --keep-cached-originals will respect is_original property from json file.