"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
http: correct root if definitely pointing to a file - fixes #8428
nielash44e83d77d754
diff --git a/backend/http/http.go b/backend/http/http.goindex 4b64ec304..d4b426a7f 100644--- a/backend/http/http.go+++ b/backend/http/http.go@@ -180,7 +180,6 @@ func getFsEndpoint(ctx context.Context, client *http.Client, url string, opt *Op}addHeaders(req, opt)res, err := noRedir.Do(req)-if err != nil {fs.Debugf(nil, "Assuming path is a file as HEAD request could not be sent: %v", err)return createFileResult()@@ -249,6 +248,14 @@ func (f *Fs) httpConnection(ctx context.Context, opt *Options) (isFile bool, errf.httpClient = clientf.endpoint = uf.endpointURL = u.String()++ if isFile {+ // Correct root if definitely pointing to a file+ f.root = path.Dir(f.root)+ if f.root == "." || f.root == "/" {+ f.root = ""+ }+ }return isFile, nil}