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

docs: remote names may not start or end with space

albertonyf650a543ef9f
diff --git a/docs/content/docs.md b/docs/content/docs.md
index 1afa2a9a0..d984970b5 100644
--- a/docs/content/docs.md
+++ b/docs/content/docs.md
@@ -340,6 +340,7 @@ Will get their own names
Remote names are case sensitive, and must adhere to the following rules:
- May only contain `0`-`9`, `A`-`Z`, `a`-`z`, `_`, `-`, `.` and space.
- May not start with `-` or space.
+ - May not end with space.
Quoting and the shell
---------------------
diff --git a/fs/fspath/path.go b/fs/fspath/path.go
index 6b8617feb..a29b0e363 100644
--- a/fs/fspath/path.go
+++ b/fs/fspath/path.go
@@ -17,7 +17,7 @@ const (
)
var (
- errInvalidCharacters = errors.New("config name contains invalid characters - may only contain `0-9`, `A-Z`, `a-z`, `_`, `-`, `.` and space")
+ errInvalidCharacters = errors.New("config name contains invalid characters - may only contain `0-9`, `A-Z`, `a-z`, `_`, `-`, `.` and space, while not start or end with space")
errCantBeEmpty = errors.New("can't use empty string as a path")
errCantStartWithDash = errors.New("config name starts with `-`")
errBadConfigParam = errors.New("config parameters may only contain `0-9`, `A-Z`, `a-z` and `_`")