volume/local: Fix cifs url containing spaces
Unescapes the URL to avoid passing an URL encoded address to the kernel.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 250886741b
)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
parent
a445aa95e5
commit
3de920a0b1
1 changed files with 5 additions and 1 deletions
|
@ -151,7 +151,11 @@ func getMountOptions(opts *optsConfig, resolveIP func(string, string) (*net.IPAd
|
|||
return "", "", errors.Wrap(err, "error resolving passed in network volume address")
|
||||
}
|
||||
deviceURL.Host = ipAddr.String()
|
||||
mountDevice = deviceURL.String()
|
||||
dev, err := url.QueryUnescape(deviceURL.String())
|
||||
if err != nil {
|
||||
return "", "", fmt.Errorf("failed to unescape device URL: %q", deviceURL)
|
||||
}
|
||||
mountDevice = dev
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue