diff options
Diffstat (limited to 'src/core/image.c')
| -rw-r--r-- | src/core/image.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/image.c b/src/core/image.c index 86c264c26..b1eba4ad4 100644 --- a/src/core/image.c +++ b/src/core/image.c @@ -224,8 +224,8 @@ int image_exec ( struct image *image ) { /* Sanity check */ assert ( image->flags & IMAGE_REGISTERED ); - /* Check that this image can be executed */ - if ( ( rc = image_probe ( image ) ) != 0 ) + /* Check that this image can be selected for execution */ + if ( ( rc = image_select ( image ) ) != 0 ) return rc; /* Switch current working directory to be that of the image itself */ @@ -302,6 +302,10 @@ int image_replace ( struct image *replacement ) { return rc; } + /* Check that the replacement image can be executed */ + if ( ( rc = image_probe ( replacement ) ) != 0 ) + return rc; + /* Clear any existing replacement */ image_put ( image->replacement ); |
