]> git.treefish.org Git - photosort.git/blobdiff - src/misc.py
fix find file exclude dir check
[photosort.git] / src / misc.py
index adb94b11a6585b4c55f058b3e960d09517608291..d47a9cf6b94ff855c42cd50c8a1d1c85d510e15f 100644 (file)
@@ -23,7 +23,7 @@ def extract_timestamp(file_path, use_exif=False):
 
 def find_file(dir_path, file_name, file_size, exclude_dir):
     for root, dirs, files in os.walk(dir_path):
-        if root == exclude_dir:
+        if root.startswith(exclude_dir):
             continue
         for f in files:
             if f == file_name:
@@ -32,7 +32,7 @@ def find_file(dir_path, file_name, file_size, exclude_dir):
                     return root
     return None
 
-def import_file(src_file_path, dst_file_path, move=False):
+def import_file(src_file_path, dst_file_path):
     shutil.copyfile(src_file_path, dst_file_path)
     src_stat = os.stat(src_file_path)
     dst_stat = os.stat(dst_file_path)