]> git.treefish.org Git - photosort.git/blobdiff - src/migrator.py
only accept alternative files with same meta time
[photosort.git] / src / migrator.py
index 73650ce215d18841ed681a941218d74f75aca391..7bd32e6d93f5bc187c96c7ee402780645c63233f 100644 (file)
@@ -29,10 +29,11 @@ class Migrator:
         dst_file_path = os.path.join(dst_dir, src_file_name)
 
         if not os.path.exists(dst_file_path):
-            alt_dst_dir = misc.find_file(self._base_dst_dir,
-                                         src_file_name,
-                                         os.path.getsize(src_file_path),
-                                         exclude_dir=self._base_src_dir)
+            alt_dst_dir = misc.find_alt_file(self._base_dst_dir,
+                                             src_file_name,
+                                             os.path.getsize(src_file_path),
+                                             meta_time,
+                                             exclude_dir=self._base_src_dir)
             if alt_dst_dir:
                 dst_dir = alt_dst_dir
                 dst_file_path = os.path.join(dst_dir, src_file_name)