aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryfszzx <yfszzx@gmail.com>2022-10-17 23:14:03 +0800
committeryfszzx <yfszzx@gmail.com>2022-10-17 23:14:03 +0800
commit2b5b62e768d892773a7ec1d5e8d8cea23aae1254 (patch)
tree7e82682dc689c96972cb212ac2552adc2cc1b572
parent2272cf2f35fafd5cd486bfb4ee89df5bbc625b97 (diff)
fix two bug
-rw-r--r--modules/images_history.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/images_history.py b/modules/images_history.py
index 1c1790a4..20324557 100644
--- a/modules/images_history.py
+++ b/modules/images_history.py
@@ -44,7 +44,7 @@ def traverse_all_files(curr_path, image_list, all_type=False):
return image_list
for file in f_list:
file = os.path.join(curr_path, file)
- if (not all_type) and file[-4:] == ".txt":
+ if (not all_type) and (file[-4:] == ".txt" or file[-4:] == ".csv"):
pass
elif os.path.isfile(file) and file[-10:].rfind(".") > 0:
image_list.append(file)
@@ -182,7 +182,7 @@ def delete_image(delete_num, name, filenames, image_index, visible_num):
def save_image(file_name):
if file_name is not None and os.path.exists(file_name):
- shutil.copy2(file_name, opts.outdir_save)
+ shutil.copy(file_name, opts.outdir_save)
def get_recent_images(page_index, step, filenames):
page_index = int(page_index)