To reproduce, run the python program onedrive_bug.py
. This needs
the python onedrivesdk. This uploades the file goof.png
repeatedly,
to the root of your onedrive as 1.png
, 2.png
, etc.
If you run it after a while you'll see a size mis-match.
This means that the 97k file is apparently 200k. If you look in the web interface it also appears as 200k, however if you download it is really only 97k.
I don't think this is a bug in the python library, rather a bug in Onedrive.
I think the bug depends on the particular file being uploaded.
A user of my program rclone
( @Darkvater )noticed the file
corruptions originally here and supplied the png file which is used
for the demo here.
This means that this bug has been reproduced with the Python SDK and my own Go SDK and from at least 4 different environments (computers, OS, net connections etc).
$ python onedrive_bug.py
Created new window in existing browser session.
127.0.0.1 - - [25/Mar/2016 16:38:50] "GET /?code=xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx HTTP/1.1" 200 -
Uploaded test file: 0.png, size 97258
Uploaded test file: 1.png, size 97258
Uploaded test file: 2.png, size 97258
Uploaded test file: 3.png, size 97258
Uploaded test file: 4.png, size 97258
Uploaded test file: 5.png, size 97258
Uploaded test file: 6.png, size 205029
**** Size mismatch
Uploaded test file: 7.png, size 205029
Uploaded test file: 8.png, size 205029
Uploaded test file: 9.png, size 205029
Uploaded test file: 10.png, size 97258
**** Size mismatch
Uploaded test file: 11.png, size 97258
Uploaded test file: 12.png, size 97258
Uploaded test file: 13.png, size 97258
Nick Craig-Wood [email protected] 2016-03-25