cr: fix checkpoint from image getting skipped
Fix restoring from a checkpoint image always getting skipped when no checkpoint image path is set. As one restores either from an image OR a path, this makes no sense. Signed-off-by: Jakob Schrettenbrunner <dev@schrej.net>
This commit is contained in:
parent
d43d546a8d
commit
ab5d93187c
@ -148,7 +148,7 @@ func (l *local) Create(ctx context.Context, r *api.CreateTaskRequest, _ ...grpc.
|
||||
return nil, err
|
||||
}
|
||||
// jump get checkpointPath from checkpoint image
|
||||
if checkpointPath != "" && r.Checkpoint != nil {
|
||||
if checkpointPath == "" && r.Checkpoint != nil {
|
||||
checkpointPath, err = ioutil.TempDir(os.Getenv("XDG_RUNTIME_DIR"), "ctrd-checkpoint")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
Reference in New Issue
Block a user