From 5a6a88b5eda8f29e4005a91203b59ea140ee0eba Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Wed, 15 Mar 2017 16:42:37 -0400 Subject: [PATCH] More on importing containers that we didn't create Continue the work from a0d394af74387fedb862efb933c31a86db40d07e by making open-by-path work correctly again. Signed-off-by: Nalin Dahyabhai --- buildah.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/buildah.go b/buildah.go index 8d9e8d1d5..b8412cc90 100644 --- a/buildah.go +++ b/buildah.go @@ -198,7 +198,11 @@ func OpenBuilderByPath(store storage.Store, path string) (*Builder, error) { return false } for _, container := range containers { - buildstate, err := store.GetMetadata(container.ID) + cdir, err := store.GetContainerDirectory(container.ID) + if err != nil { + return nil, err + } + buildstate, err := ioutil.ReadFile(filepath.Join(cdir, stateFile)) if err != nil { return nil, err }