Dropbox backend: Upload last part using files_upload_session_finish
Bug #1573957 reported by
Henrik Farre
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Hi
Duplicity version: 0.7.07-1
Python version: 2.7.11-3
OS Distro and version: Arch Linux
Type of target filesystem: Dropbox
In duplicity/
I have attached a patch that uploads the last chunk using self.api_
I'm not a python developer so bear with me :)
Changed in duplicity: | |
importance: | Undecided → Medium |
milestone: | none → 0.7.08 |
status: | New → Fix Committed |
Changed in duplicity: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Hi,
Initially I've coded backend with zero-size flush just to make sure everything is ok (because I was getting corrupted files with old code).
Your patch relies on assumption that read(2) always returns requested amount of bytes (except EOF) which is not true.
I'm attaching two patches: session_ finish to avoid extra request for large files
01. uses files_upload_
02. uses non-chunked files_upload call for small files (less than chunk size).
passes RUN_CODE_TESTS=1 and backendtest.