From 705a8a9116ab3f9f7232e8bef2ec69c118f9094c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Constantin=20F=C3=BCrst?= Date: Tue, 30 Aug 2022 10:02:38 +0200 Subject: [PATCH] check for destination and not source file extension when marking folder as existing --- libconv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libconv.py b/libconv.py index eead427..6635e0f 100644 --- a/libconv.py +++ b/libconv.py @@ -180,7 +180,7 @@ def prepare_destination(path: str) -> Tuple[str,bool]: new_path = DST_FOLDER + sub_path mkdir(new_path) - existing: bool = len(os.listdir(new_path)) != 0 + existing: bool = len(get_files_with_ext(new_path, DST_FILE_EXT)) != 0 for img in images: img_name = img.replace(path, "")