diff --git a/libpod/container_internal.go b/libpod/container_internal.go index c3fee6552a..4ffd0e29a9 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -128,6 +128,9 @@ func (c *Container) rwSize() (int64, error) { // bundlePath returns the path to the container's root filesystem - where the OCI spec will be // placed, amongst other things func (c *Container) bundlePath() string { + if c.runtime.storageConfig.TransientStore { + return c.state.RunDir + } return c.config.StaticDir } diff --git a/libpod/container_internal_test.go b/libpod/container_internal_test.go index af3a5886c0..167ffabe64 100644 --- a/libpod/container_internal_test.go +++ b/libpod/container_internal_test.go @@ -118,6 +118,7 @@ func TestPostDeleteHooks(t *testing.T) { statePath := filepath.Join(dir, "state") copyPath := filepath.Join(dir, "copy") c := Container{ + runtime: &Runtime{}, config: &ContainerConfig{ ID: "123abc", Spec: &rspec.Spec{