1
mirror of https://github.com/rclone/rclone synced 2024-11-05 01:42:31 +01:00
rclone/fs/cache
Nick Craig-Wood 8d5bc7f28b fs/cache: fix moveto/copyto remote:file remote:file2
Before this change, if the cache was given a source `remote:file` it
stored `remote:` with the error `fs.ErrorIsFile` attached. This meant
that if it `remote:` was subsequently looked up it would return the
`fs.ErrorIsFile` error.

This broke `moveto remote:file remote:file2` as moveto would lookup
`remote:` from the second argument and erroneously get the
`fs.ErrorIsFile` error.

This likely broke other commands too.

This was broken in

4c9836035 fs/cache: Add Pin and Unpin and canonicalised lookup

Which was released in v1.52.0

The fix is to make a new cache entry for `remote:` with no error
attached in the case that the original call returned `fs.ErrorIsFile`.
2020-07-02 10:55:36 +01:00
..
cache_test.go fs/cache: fix moveto/copyto remote:file remote:file2 2020-07-02 10:55:36 +01:00
cache.go fs/cache: fix moveto/copyto remote:file remote:file2 2020-07-02 10:55:36 +01:00