From a7f6451921523515d25bfdb52be1ccd7a66c538d Mon Sep 17 00:00:00 2001 From: khuxkm fbexl Date: Sat, 17 Aug 2019 04:49:19 +0000 Subject: [PATCH] Fix error when dealing with filename collision --- utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 282dcb9..768105d 100644 --- a/utils.py +++ b/utils.py @@ -33,7 +33,7 @@ def get_name_from_title(title): n = 1 while os.path.exists(os.path.join(shipdir,t+str(n)+".txt")): n+=1 - return os.path.join(shipdir,t+str(num)+".txt") + return os.path.join(shipdir,t+str(n)+".txt") else: return os.path.join(shipdir,t+".txt") def write_file(filename,text):