Skip to content

Commit ab5d931

Browse files
committed
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 <[email protected]>
1 parent d43d546 commit ab5d931

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

services/tasks/local.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func (l *local) Create(ctx context.Context, r *api.CreateTaskRequest, _ ...grpc.
148148
return nil, err
149149
}
150150
// jump get checkpointPath from checkpoint image
151-
if checkpointPath != "" && r.Checkpoint != nil {
151+
if checkpointPath == "" && r.Checkpoint != nil {
152152
checkpointPath, err = ioutil.TempDir(os.Getenv("XDG_RUNTIME_DIR"), "ctrd-checkpoint")
153153
if err != nil {
154154
return nil, err

0 commit comments

Comments
 (0)