mirror of
https://github.com/rclone/rclone.git
synced 2026-10-28 14:28:38 -04:00
deleteObject() replied 404 for any error from newObject(), while serveObject() in the same file replies 404 only for fs.ErrorObjectNotFound and 500 otherwise. restic treats a 404 on DELETE as final and never retries, so a transient lookup failure while removing a lock left the lock behind and broke the next exclusive operation (eg forget --prune failing with "repository is already locked"). This change mirrors serveObject() handling of 404/500 errors in deleteObject(). Fixes #10100 Co-authored-by: bunnysayzz <bunnysayzz@users.noreply.github.com>