mirror of
https://github.com/rclone/rclone.git
synced 2024-11-07 09:04:52 +01:00
combine: throw error if duplicate directory name is specified
See: https://forum.rclone.org/t/v1-59-combine-qs/31814
This commit is contained in:
parent
f753d7cd42
commit
9c6cfc1ff0
@ -206,9 +206,13 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (outFs fs
|
||||
return err
|
||||
}
|
||||
mu.Lock()
|
||||
f.upstreams[dir] = u
|
||||
if _, found := f.upstreams[dir]; found {
|
||||
err = fmt.Errorf("duplicate directory name %q", dir)
|
||||
} else {
|
||||
f.upstreams[dir] = u
|
||||
}
|
||||
mu.Unlock()
|
||||
return nil
|
||||
return err
|
||||
})
|
||||
}
|
||||
err = g.Wait()
|
||||
|
Loading…
Reference in New Issue
Block a user