mirror of
https://github.com/rclone/rclone.git
synced 2026-07-01 03:15:06 -04:00
When a cached file was closed, --vfs-handle-caching kept its handle and downloaders alive for a grace period and closed them later from a timer. The deferred close drops the item lock while tearing down the downloaders, leaving the file handle open. A reopen landing in that window saw no grace timer and a live handle, failed to create the cache file with "internal error: didn't Close file" and removed the cache file, which hung the application reopening the file. Reopens now wait for an in-progress grace-period close to finish so they start from a fully closed item. See: https://forum.rclone.org/t/opening-a-recently-closed-and-cached-file-hangs-rclone/53986/