mirror of
https://github.com/rclone/rclone.git
synced 2026-09-25 15:26:13 -04:00
After PUTting a file to the upload URL, Yandex keeps the file locked for writing until the upload operation finishes committing on the server. The PUT returned before this happened, so the following SetModTime raced the still-in-progress write and got spurious 500 Internal Server Error responses. Capture the operation_id returned with the upload URL and poll the operation status until it reports success before returning, so the file is fully committed before we access it.