mirror of
https://github.com/rclone/rclone.git
synced 2025-08-17 17:11:37 +02:00
fspath: Implement a connection string parser #4996
This is implemented as a state machine parser so it can emit sensible error messages. It does not use the connection strings elsewhere in rclone yet - see subsequent commits. An optional fuzzer is implemented for the Parse function.
This commit is contained in:
@ -122,11 +122,11 @@ func Start(remoteName string) (fn func(), err error) {
|
||||
// don't start the local backend
|
||||
return func() {}, nil
|
||||
}
|
||||
var name string
|
||||
name, _, err = fspath.Parse(remoteName)
|
||||
parsed, err := fspath.Parse(remoteName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := parsed.ConfigString
|
||||
if name == "" {
|
||||
// don't start the local backend
|
||||
return func() {}, nil
|
||||
|
Reference in New Issue
Block a user