mirror of
https://github.com/gryf/slack-backup.git
synced 2026-11-21 12:36:54 +01:00
Fix for new fnames in case of already existing ones
This commit is contained in:
1 parent
0d7607cf3c
commit
a42506dff9
1 file changed
+4
-2
@@ -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):
|
||||||
base, ext = os.path.splitext(path)
|
if count == 1:
|
||||||
path = base + "%0.3d" % count + ext
|
base, ext = os.path.splitext(path)
|
||||||
|
path = base + ".%0.3d" % count + ext
|
||||||
|
count += 1
|
||||||
|
|
||||||
return path
|
return path
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user