From: Alexander Schmidt Date: Fri, 16 Oct 2020 12:46:25 +0000 (+0200) Subject: fix find file exclude dir check X-Git-Url: http://git.treefish.org/~alex/photosort.git/commitdiff_plain/cabba6bc56b67037e818b7904bc0e6c27f0a363c fix find file exclude dir check --- diff --git a/src/misc.py b/src/misc.py index 9f5d677..d47a9cf 100644 --- a/src/misc.py +++ b/src/misc.py @@ -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: