mirror of
https://github.com/gryf/slack-backup.git
synced 2025-12-17 03:20:25 +01:00
Fix for new fnames in case of already existing ones
This commit is contained in:
@@ -79,8 +79,10 @@ class Download(object):
|
||||
count = 1
|
||||
|
||||
while filetype != 'avatar' and os.path.exists(path):
|
||||
base, ext = os.path.splitext(path)
|
||||
path = base + "%0.3d" % count + ext
|
||||
if count == 1:
|
||||
base, ext = os.path.splitext(path)
|
||||
path = base + ".%0.3d" % count + ext
|
||||
count += 1
|
||||
|
||||
return path
|
||||
|
||||
|
||||
Reference in New Issue
Block a user