[fix] dropbox upload of unicode filenames
When using Unicode filenames Dropbox backup fails with an error similar to: UnicodeEncodeError: 'ascii' codec can't encode character u'\u015f' in position 44: ordinal not in range(128) This commit fixes this issue.
This commit is contained in:
parent
2d9e441cd0
commit
0df3335e9e
1 changed files with 1 additions and 1 deletions
|
|
@ -146,7 +146,7 @@ def upload_from_folder(path, dropbox_folder, dropbox_client, did_not_upload, err
|
|||
def upload_file_to_dropbox(filename, folder, dropbox_client):
|
||||
create_folder_if_not_exists(folder, dropbox_client)
|
||||
chunk_size = 4 * 1024 * 1024
|
||||
file_size = os.path.getsize(filename)
|
||||
file_size = os.path.getsize(encode(filename))
|
||||
mode = (dropbox.files.WriteMode.overwrite)
|
||||
|
||||
f = open(encode(filename), 'rb')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue