mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01: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:
@@ -1474,8 +1474,9 @@ func Run(t *testing.T, opt *Opt) {
|
||||
t.Skip("Can't list from root on this remote")
|
||||
}
|
||||
|
||||
configName, configLeaf, err := fspath.Parse(subRemoteName)
|
||||
parsed, err := fspath.Parse(subRemoteName)
|
||||
require.NoError(t, err)
|
||||
configName, configLeaf := parsed.ConfigString, parsed.Path
|
||||
if configName == "" {
|
||||
configName, configLeaf = path.Split(subRemoteName)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user