Browse code

Fixes #933 Fix dst copy when the destination file was modified

by_md5 is not anymore a list but a single string value

Florent Viard authored on 2017/11/09 09:44:46
Showing 1 changed files
... ...
@@ -591,7 +591,7 @@ def compare_filelists(src_list, dst_list, src_remote, dst_remote):
591 591
                     md5 = None
592 592
                 if md5 is not None and md5 in dst_list.by_md5:
593 593
                     # Found one, we want to copy
594
-                    dst1 = list(dst_list.by_md5[md5])[0]
594
+                    dst1 = dst_list.find_md5_one(md5)
595 595
                     debug(u"DST COPY src: %s -> %s" % (dst1, relative_file))
596 596
                     copy_pairs.append((src_list[relative_file], dst1, relative_file))
597 597
                     del(src_list[relative_file])