From 53cb65f2bb665d6684f0ceb7960565c0801bdc2c Mon Sep 17 00:00:00 2001 From: phixxy Date: Sun, 9 Jul 2023 15:09:46 -0700 Subject: [PATCH] fixed bug in listing server files for ai-images webpage --- sparkytron3000.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sparkytron3000.py b/sparkytron3000.py index e069af3..28b5459 100644 --- a/sparkytron3000.py +++ b/sparkytron3000.py @@ -72,7 +72,7 @@ async def upload_ftp_ai_images(filename, prompt): server_files = ftp.nlst(ftp_ai_images) server_files.sort() try: - file_count = int(server_files[-2][-11:-4])+1 + file_count = int(len(server_files)) except: file_count = 0 new_file_name = str(file_count).zfill(7) + ".png"