mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 12:05:05 +08:00
fspath: remove unused capture group in remote name regex
This commit is contained in:
parent
04a663829b
commit
c571200812
|
@ -14,7 +14,7 @@ import (
|
|||
|
||||
const (
|
||||
configNameRe = `[\w. -]+`
|
||||
remoteNameRe = `(:?` + configNameRe + `)`
|
||||
remoteNameRe = `:?` + configNameRe
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -35,7 +35,7 @@ var (
|
|||
configNameMatcher = regexp.MustCompile(`^` + configNameRe + `$`)
|
||||
|
||||
// remoteNameMatcher is a pattern to match an rclone remote name at the start of a config
|
||||
remoteNameMatcher = regexp.MustCompile(`^` + remoteNameRe + `(:$|,)`)
|
||||
remoteNameMatcher = regexp.MustCompile(`^` + remoteNameRe + `(?::$|,)`)
|
||||
)
|
||||
|
||||
// CheckConfigName returns an error if configName is invalid
|
||||
|
|
Loading…
Reference in New Issue
Block a user