"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
Fix oddities using a file in the root - fixes #471
Nick Craig-Woodd205dc23e953
diff --git a/local/local.go b/local/local.goindex 1f1bce996..474c27cec 100644--- a/local/local.go+++ b/local/local.go@@ -77,6 +77,9 @@ func NewFs(name, root string) (fs.Fs, error) {var remote stringf.root, remote = getDirFile(f.root)obj := f.NewFsObject(remote)+ if obj == nil {+ return nil, fmt.Errorf("Failed to make object for %q in %q", remote, f.root)+ }// return a Fs Limited to this objectreturn fs.NewLimited(f, obj), nil}@@ -622,7 +625,11 @@ func (o *Object) Remove() error {// Assumes os.PathSeparator is used.func getDirFile(s string) (string, string) {i := strings.LastIndex(s, string(os.PathSeparator))- return s[:i], s[i+1:]+ dir, file := s[:i], s[i+1:]+ if dir == "" {+ dir = string(os.PathSeparator)+ }+ return dir, file}func (f *Fs) filterPath(s string) string {