Skip to content

Commit

Permalink
Fix CheckpointList
Browse files Browse the repository at this point in the history
A container checkpoint directory doesn't have config.json.

Signed-off-by: Andrei Vagin <[email protected]>
  • Loading branch information
avagin committed Mar 1, 2019
1 parent bd4fff3 commit 0b96bf8
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions daemon/checkpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package daemon // import "github.com/docker/docker/daemon"

import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"os"
Expand Down Expand Up @@ -127,15 +126,7 @@ func (daemon *Daemon) CheckpointList(name string, config types.CheckpointListOpt
if !d.IsDir() {
continue
}
path := filepath.Join(checkpointDir, d.Name(), "config.json")
data, err := ioutil.ReadFile(path)
if err != nil {
return nil, err
}
var cpt types.Checkpoint
if err := json.Unmarshal(data, &cpt); err != nil {
return nil, err
}
cpt := types.Checkpoint{Name: d.Name()}
out = append(out, cpt)
}

Expand Down

0 comments on commit 0b96bf8

Please sign in to comment.