mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
cache: preserve leading / in wrapped remote path
When combining the remote value and the root path, preserve the absence or presence of the / at the beginning of the wrapped remote path. e.g. a remote "cloud:" and root path "dir" becomes "cloud:dir" instead of "cloud:/dir". Fixes #2553
This commit is contained in:
committed by
Nick Craig-Wood
parent
eb5a95e7de
commit
f6ee0795ac
@@ -243,6 +243,19 @@ which makes it think we're downloading the full file instead of small chunks.
|
||||
Organizing the remotes in this order yelds better results:
|
||||
<span style="color:green">**cloud remote** -> **cache** -> **crypt**</span>
|
||||
|
||||
#### absolute remote paths ####
|
||||
|
||||
`cache` can not differentiate between relative and absolute paths for the wrapped remote.
|
||||
Any path given in the `remote` config setting and on the command line will be passed to
|
||||
the wrapped remote as is, but for storing the chunks on disk the path will be made
|
||||
relative by removing any leading `/` character.
|
||||
|
||||
This behavior is irrelevant for most backend types, but there are backends where a leading `/`
|
||||
changes the effective directory, e.g. in the `sftp` backend paths starting with a `/` are
|
||||
relative to the root of the SSH server and paths without are relative to the user home directory.
|
||||
As a result `sftp:bin` and `sftp:/bin` will share the same cache folder, even if they represent
|
||||
a different directory on the SSH server.
|
||||
|
||||
### Cache and Remote Control (--rc) ###
|
||||
Cache supports the new `--rc` mode in rclone and can be remote controlled through the following end points:
|
||||
By default, the listener is disabled if you do not add the flag.
|
||||
|
||||
Reference in New Issue
Block a user