Fix checkpoint list when no dir

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2015-12-08 17:08:39 -08:00
parent e87f8336c4
commit cab1086d27
1 changed files with 3 additions and 0 deletions

View File

@ -199,6 +199,9 @@ func (c *libcontainerContainer) Checkpoints() ([]runtime.Checkpoint, error) {
out := []runtime.Checkpoint{}
files, err := ioutil.ReadDir(c.getCheckpointPath(""))
if err != nil {
if os.IsNotExist(err) {
return out, nil
}
return nil, err
}
for _, fi := range files {