diff --git a/main.py b/main.py index 1e99b0f..b9706ef 100644 --- a/main.py +++ b/main.py @@ -29,6 +29,7 @@ def convert_all(path = os.path.abspath('.')): def convert_img(path = os.path.abspath('.')): files = os.listdir(path) for file in files: + file = file.lower() # 排除 .PNG 等带来的问题 if file.endswith('.pdf'): result = pdf2img(path, file) if result: # 1 -> Error @@ -52,7 +53,7 @@ def gen_filelist(path = os.path.abspath('.')): png_count = 0 dir_file_copy = copy(dir_file) for file in dir_file_copy: - if ".png" in file: + if ".png" in file.lower(): png_count += 1 else: dir_file.remove(file)