From cf83824e81fe35ba3adc5fe0fbc31bcd7e4299c0 Mon Sep 17 00:00:00 2001 From: Nzix Date: Sun, 28 Oct 2018 14:30:50 +0800 Subject: [PATCH] fix rename bug --- app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 01943a9..905b49e 100644 --- a/app.py +++ b/app.py @@ -37,8 +37,9 @@ def validate_name(file_name): def validate_collision(file_path): index = 1 + origin = file_path while os.path.exists(file_path): - file_path = '({})'.format(index).join(os.path.splitext(file_path)) + file_path = '({})'.format(index).join(os.path.splitext(origin)) index += 1 return file_path