Tue, 06 May 2025 19:45:12 +0200
last change on 2023-07-11, commit in 2025 for completeness of obsoletion ;)
dupecheck.py | file | annotate | diff | comparison | revisions |
--- a/dupecheck.py Sun Nov 22 23:08:17 2020 +0100 +++ b/dupecheck.py Tue May 06 19:45:12 2025 +0200 @@ -262,6 +262,9 @@ del self.filelist[idx] break listlen = len(self.filelist) + print("%i files left to analyze after revoving duplicates" % ( + listlen)) + for idx in range(listlen): if not self.filelist[idx]: @@ -271,8 +274,9 @@ sys.stdout.flush() for idx2 in range(idx + 1, listlen): if self.filelist[idx2]: + if not self.filelist[idx2]: + continue if similarity(self.filelist[idx][0], self.filelist[idx2][0]) > self.ratio: - #print "possible duplicate %d %s" % (idx2, item2[0]) key = os.path.join(self.filelist[idx][2], self.filelist[idx][1]) if not key in self.duplicates: self.duplicates[key] = [] @@ -336,7 +340,8 @@ if os.path.isfile("dupecheck-ignore.txt"): # read the entire file line by line into buffer print("Loading ignore filename prefixes file for dupe checking...") - dupe.ignore_fileprefix = [line.rstrip('\n').rstrip('\r') for line in open("dupecheck-ignore.txt", "rb")] + dupe.ignore_fileprefix = [line.lower().rstrip('\n').rstrip('\r') for line in open("dupecheck-ignore.txt", "rb")] + #print(dupe.ignore_fileprefix) if args.fixnames: for srcstr in args.basedir: