"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
vfs: make cache dir absolute before using it to fix path too long errors
Nick Craig-Wood4f8ee736b113
diff --git a/vfs/vfscache/cache.go b/vfs/vfscache/cache.goindex 525fe6f83..bd7be51a3 100644--- a/vfs/vfscache/cache.go+++ b/vfs/vfscache/cache.go@@ -81,9 +81,14 @@ func New(ctx context.Context, fremote fs.Fs, opt *vfscommon.Options, avFn AddVir}fRoot = strings.Replace(fRoot, ":", "", -1)}- root := file.UNCPath(filepath.Join(config.CacheDir, "vfs", fremote.Name(), fRoot))+ cacheDir := config.CacheDir+ cacheDir, err := filepath.Abs(cacheDir)+ if err != nil {+ return nil, errors.Wrap(err, "failed to make --cache-dir absolute")+ }+ root := file.UNCPath(filepath.Join(cacheDir, "vfs", fremote.Name(), fRoot))fs.Debugf(nil, "vfs cache: root is %q", root)- metaRoot := file.UNCPath(filepath.Join(config.CacheDir, "vfsMeta", fremote.Name(), fRoot))+ metaRoot := file.UNCPath(filepath.Join(cacheDir, "vfsMeta", fremote.Name(), fRoot))fs.Debugf(nil, "vfs cache: metadata root is %q", root)fcache, err := fscache.Get(ctx, root)