There were a couple of mentions in the forums about various errors that started with unexpected conditions during reading
. I assumed that those were invalid caches from older versions. That’s still a possibility however:
Recently, this happened to me as well and since I knew I wasn’t using an old cache version, I started to investigate.
It seems that when using -temp-path and files will be copied with the same name but different content (Plex agents do this very often with subtitles, especially for new releases), cache will keep the old cached data but refresh the metadata (size, has etc).
Reading from these files would have ended unexpected since the data didn’t match anymore.
Suffice to say, cache is now deleting cached data (if it exists) when it will receive a cloud notification to ensure that it will read a likely updated file from the cloud provider.
In the future, it’s perhaps better if it will actually cache rather than delete it to save some bandwidth but I wanted this bug fixed first.
Beta with the fix: https://beta.rclone.org/v1.40-035-g1dea99ab/