c193dee9ae
The number of the last segment uploaded returned by upload wasn't correct in all the return statements. The Put method calls upload but with the returned values wasn't even certain of cleaning up correctly the segments uploaded when an error happens. This commit moves the logic of cleaning up inside of the upload method because it's easier to understand than only doing inside of it the clean up when a context cancellation happens. It also fixes the number of segments to be deleted by cancelHandler when an error happens. These changes should avoid trying to delete segments which haven't been uploaded because of the wrong index value or because of being inline. |
||
---|---|---|
.. | ||
eof.go | ||
path.go | ||
shim.go | ||
size.go | ||
store_test.go | ||
store.go |