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:
		 Jakob
					Jakob
				
			
				
					committed by
					
						 Jakob Schrettenbrunner
						Jakob Schrettenbrunner
					
				
			
			
				
	
			
			
			 Jakob Schrettenbrunner
						Jakob Schrettenbrunner
					
				
			
						parent
						
							d43d546a8d
						
					
				
				
					commit
					ab5d93187c
				
			| @@ -148,7 +148,7 @@ func (l *local) Create(ctx context.Context, r *api.CreateTaskRequest, _ ...grpc. | |||||||
| 		return nil, err | 		return nil, err | ||||||
| 	} | 	} | ||||||
| 	// jump get checkpointPath from checkpoint image | 	// 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") | 		checkpointPath, err = ioutil.TempDir(os.Getenv("XDG_RUNTIME_DIR"), "ctrd-checkpoint") | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
| 			return nil, err | 			return nil, err | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user