Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

In remote paths, change native directory separators to / - fixes #37

Nick Craig-Woodb4a0941d4c7c
diff --git a/fs/fs.go b/fs/fs.go
index 0a148c52f..e666997ac 100644
--- a/fs/fs.go
+++ b/fs/fs.go
@@ -6,6 +6,7 @@ import (
"fmt"
"io"
"log"
+ "path/filepath"
"regexp"
"time"
)
@@ -235,6 +236,8 @@ func NewFs(path string) (Fs, error) {
if err != nil {
return nil, err
}
+ // change native directory separators to / if there are any
+ fsPath = filepath.ToSlash(fsPath)
return fs.NewFs(configName, fsPath)
}