summaryrefslogtreecommitdiff
path: root/pkg/specgen
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-26 16:38:18 +0100
committerGitHub <noreply@github.com>2020-11-26 16:38:18 +0100
commit5af0266847fa304a25e038e1cf7fe1e3f4143f65 (patch)
tree7eeb18e06b04600cbf3ea045a03f3a920a1a519d /pkg/specgen
parent397e9a9f1b146617120690243a89fa9541f0854c (diff)
parentf7f85fef7c7086a39e57eb36e875209bb9553f4e (diff)
downloadpodman-5af0266847fa304a25e038e1cf7fe1e3f4143f65.tar.gz
podman-5af0266847fa304a25e038e1cf7fe1e3f4143f65.tar.bz2
podman-5af0266847fa304a25e038e1cf7fe1e3f4143f65.zip
Merge pull request #8481 from Luap99/fix-remote-volume-path
Do not validate the volume source path in specgen
Diffstat (limited to 'pkg/specgen')
-rw-r--r--pkg/specgen/volumes.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/specgen/volumes.go b/pkg/specgen/volumes.go
index 1178f9960..41efee3b3 100644
--- a/pkg/specgen/volumes.go
+++ b/pkg/specgen/volumes.go
@@ -84,11 +84,10 @@ func GenVolumeMounts(volumeFlag []string) (map[string]spec.Mount, map[string]*Na
return nil, nil, nil, err
}
}
-
// Do not check source dir for anonymous volumes
if len(splitVol) > 1 {
- if err := parse.ValidateVolumeHostDir(src); err != nil {
- return nil, nil, nil, err
+ if len(src) == 0 {
+ return nil, nil, nil, errors.New("host directory cannot be empty")
}
}
if err := parse.ValidateVolumeCtrDir(dest); err != nil {