mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 20:31:35 +00:00
If we can't get a safe filename, name the file after it's ID
This commit is contained in:
@@ -4111,6 +4111,8 @@ def downloadDriveFile(users):
|
|||||||
continue
|
continue
|
||||||
file_title = result[u'title']
|
file_title = result[u'title']
|
||||||
safe_file_title = u''.join(c for c in file_title if c in safe_filename_chars)
|
safe_file_title = u''.join(c for c in file_title if c in safe_filename_chars)
|
||||||
|
if len(safe_file_title) < 1:
|
||||||
|
safe_file_title = fileId
|
||||||
filename = os.path.join(targetFolder, safe_file_title)
|
filename = os.path.join(targetFolder, safe_file_title)
|
||||||
y = 0
|
y = 0
|
||||||
while True:
|
while True:
|
||||||
|
|||||||
Reference in New Issue
Block a user