If we can't get a safe filename, name the file after it's ID

This commit is contained in:
Jay Lee
2017-02-21 15:03:45 -05:00
parent f0351b8bec
commit 3ffa3ca5e5

View File

@ -4111,6 +4111,8 @@ def downloadDriveFile(users):
continue
file_title = result[u'title']
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)
y = 0
while True: