forked from TrueCloudLab/rclone
docker: fix volume plugin does not remount volume on docker restart
docker volume plugin restoreState: skip fs option if empty Fixes #6769 Co-authored-by: Peter Kreuser <logo@kreuser.name>
This commit is contained in:
parent
56b582cdb9
commit
5039f9be48
1 changed files with 7 additions and 5 deletions
|
@ -60,12 +60,14 @@ func (vol *Volume) applyOptions(volOpt VolOpts) error {
|
|||
case "":
|
||||
continue
|
||||
case "remote", "fs":
|
||||
p, err := fspath.Parse(str)
|
||||
if err != nil || p.Name == ":" {
|
||||
return fmt.Errorf("cannot parse path %q: %w", str, err)
|
||||
if str != "" {
|
||||
p, err := fspath.Parse(str)
|
||||
if err != nil || p.Name == ":" {
|
||||
return fmt.Errorf("cannot parse path %q: %w", str, err)
|
||||
}
|
||||
fsName, fsPath, fsOpt = p.Name, p.Path, p.Config
|
||||
vol.Fs = str
|
||||
}
|
||||
fsName, fsPath, fsOpt = p.Name, p.Path, p.Config
|
||||
vol.Fs = str
|
||||
case "type":
|
||||
fsType = str
|
||||
vol.Type = str
|
||||
|
|
Loading…
Reference in a new issue