forked from TrueCloudLab/rclone
vfs: fix cache encoding with special characters - #7760
The vfs use the hardcoded OS encoding when creating temp file, but decode it with encoding for the local filesystem (--local-encoding) when copying it to remote. This caused failures when the filenames contained special characters. The hardcoded OS encoding is now used uniformly.
This commit is contained in:
parent
e041796bfe
commit
2a615f4681
2 changed files with 3 additions and 3 deletions
|
@ -212,7 +212,7 @@ func (c *Cache) createItemDir(name string) (string, error) {
|
||||||
|
|
||||||
// getBackend gets a backend for a cache root dir
|
// getBackend gets a backend for a cache root dir
|
||||||
func getBackend(ctx context.Context, parentPath string, name string, relativeDirPath string) (fs.Fs, error) {
|
func getBackend(ctx context.Context, parentPath string, name string, relativeDirPath string) (fs.Fs, error) {
|
||||||
path := fmt.Sprintf("%s/%s/%s", parentPath, name, relativeDirPath)
|
path := fmt.Sprintf(":local,encoding='%v':%s/%s/%s", encoder.OS, parentPath, name, relativeDirPath)
|
||||||
return fscache.Get(ctx, path)
|
return fscache.Get(ctx, path)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue