boto/boto — Issue #630: Bug: In 2.2.2 compute_db returns 0 size when because does not seek(0)
Author: mosheco
Created: 2012-03-09 14:46:29+00:00
State: open

compute_db() returns a size of 0 because it just computes the difference from an initial "spos = fp.tell()" line.
The pointer might be at the end of a file, though.
In 2.0 this worked because it started of with a seek(0).

This caused storing of 0 sized files on S3 when the files given to set_contents_from_file() where StringIO objects that have just been written.
The workaround to fix this is simple: the client just calls seek() before calling set_contents_from_file(), but the client should not have to do this.