mirror of
https://github.com/rclone/rclone.git
synced 2025-08-18 01:20:16 +02:00
fspath: allow unicode numbers and letters in remote names
Previously it was limited to plain ASCII (0-9, A-Z, a-z). Implemented by adding \p{L}\p{N} alongside the \w in the regex, even though these overlap it means we can be sure it is 100% backwards compatible. Fixes #6618
This commit is contained in:
committed by
Nick Craig-Wood
parent
f650a543ef
commit
8e6a469f98
@@ -23,6 +23,7 @@ func TestCheckConfigName(t *testing.T) {
|
||||
want error
|
||||
}{
|
||||
{"remote", nil},
|
||||
{"REMOTE", nil},
|
||||
{"", errInvalidCharacters},
|
||||
{":remote:", errInvalidCharacters},
|
||||
{"remote:", errInvalidCharacters},
|
||||
@@ -38,6 +39,8 @@ func TestCheckConfigName(t *testing.T) {
|
||||
{"..", nil},
|
||||
{".r.e.m.o.t.e.", nil},
|
||||
{"rem ote", nil},
|
||||
{"blåbær", nil},
|
||||
{"chữ Quốc ngữ", nil},
|
||||
{"remote ", errInvalidCharacters},
|
||||
{" remote", errInvalidCharacters},
|
||||
{" remote ", errInvalidCharacters},
|
||||
@@ -53,6 +56,7 @@ func TestCheckRemoteName(t *testing.T) {
|
||||
want error
|
||||
}{
|
||||
{":remote:", nil},
|
||||
{":REMOTE:", nil},
|
||||
{":s3:", nil},
|
||||
{"remote:", nil},
|
||||
{".:", nil},
|
||||
@@ -60,6 +64,8 @@ func TestCheckRemoteName(t *testing.T) {
|
||||
{".r.e.m.o.t.e.:", nil},
|
||||
{"-r-emote-:", nil},
|
||||
{"rem ote:", nil},
|
||||
{"blåbær:", nil},
|
||||
{"chữ Quốc ngữ:", nil},
|
||||
{"remote :", errInvalidCharacters},
|
||||
{" remote:", errInvalidCharacters},
|
||||
{" remote :", errInvalidCharacters},
|
||||
|
Reference in New Issue
Block a user