diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py index be4f36f..0698813 100755 --- a/kindlecomicconverter/comic2ebook.py +++ b/kindlecomicconverter/comic2ebook.py @@ -582,6 +582,10 @@ def imgDirectoryProcessing(path): workerPool.join() img_processing_end = perf_counter() print(f"imgFileProcessing: {img_processing_end - img_processing_start} seconds") + + # macOS 15 likes to add ._ files after multiprocessing + dot_clean(path) + if GUI and not GUI.conversionAlive: rmtree(os.path.join(path, '..', '..'), True) raise UserWarning("Conversion interrupted.") @@ -839,7 +843,11 @@ def sanitizePermissions(filetree): os.chmod(os.path.join(root, name), S_IWRITE | S_IREAD) for name in dirs: os.chmod(os.path.join(root, name), S_IWRITE | S_IREAD | S_IEXEC) - for root, dirs, files in os.walk(filetree, False): + # clean dot from original file + dot_clean(filetree) + +def dot_clean(filetree): + for root, _, files in os.walk(filetree, topdown=False): for name in files: if name.startswith('._'): os.remove(os.path.join(root, name))