1
mirror of https://github.com/rclone/rclone synced 2024-11-05 01:42:31 +01:00

testserver: don't allow starting of an empty remote

This commit is contained in:
Nick Craig-Wood 2020-05-25 15:26:06 +01:00
parent 2b72c7f709
commit baaec5b126

View File

@ -118,6 +118,10 @@ func start(name string) error {
// Start starts the named test server which can be stopped by the
// function returned.
func Start(remoteName string) (fn func(), err error) {
if remoteName == "" {
// don't start the local backend
return func() {}, nil
}
var name string
name, _, err = fspath.Parse(remoteName)
if err != nil {