mirror of
https://github.com/gryf/slack-backup.git
synced 2025-12-17 11:30: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
|
count = 1
|
||||||
|
|
||||||
while filetype != 'avatar' and os.path.exists(path):
|
while filetype != 'avatar' and os.path.exists(path):
|
||||||
|
if count == 1:
|
||||||
base, ext = os.path.splitext(path)
|
base, ext = os.path.splitext(path)
|
||||||
path = base + "%0.3d" % count + ext
|
path = base + ".%0.3d" % count + ext
|
||||||
|
count += 1
|
||||||
|
|
||||||
return path
|
return path
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user