mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
fix: allow volume creation when the _data directory already exists
This restores pre f7e72bc86aff2ff986290f190309deceb7f22099 behavior Signed-off-by: Yan Minari <yangm97@gmail.com>
This commit is contained in:
@ -75,7 +75,7 @@ func (r *Runtime) newVolume(ctx context.Context, options ...VolumeCreateOption)
|
||||
return nil, errors.Wrapf(err, "error chowning volume directory %q to %d:%d", volPathRoot, volume.config.UID, volume.config.GID)
|
||||
}
|
||||
fullVolPath := filepath.Join(volPathRoot, "_data")
|
||||
if err := os.Mkdir(fullVolPath, 0755); err != nil {
|
||||
if err := os.MkdirAll(fullVolPath, 0755); err != nil {
|
||||
return nil, errors.Wrapf(err, "error creating volume directory %q", fullVolPath)
|
||||
}
|
||||
if err := os.Chown(fullVolPath, volume.config.UID, volume.config.GID); err != nil {
|
||||
|
Reference in New Issue
Block a user