summaryrefslogtreecommitdiffstats
path: root/src/core/image.c
diff options
context:
space:
mode:
authorSimon Rettberg2022-05-11 10:41:01 +0200
committerSimon Rettberg2022-05-11 10:41:01 +0200
commita12e3c379cf2e5946c7316259ef46736cdd5f222 (patch)
tree49638dad528a4490e293ea4a0f87e39ce862a75b /src/core/image.c
parentLocal UEFI disk boot support (diff)
parent[cloud] Allow aws-import script to run on Python 3.6 (diff)
downloadipxe-a12e3c379cf2e5946c7316259ef46736cdd5f222.tar.gz
ipxe-a12e3c379cf2e5946c7316259ef46736cdd5f222.tar.xz
ipxe-a12e3c379cf2e5946c7316259ef46736cdd5f222.zip
Merge branch 'master' into openslx
Diffstat (limited to 'src/core/image.c')
-rw-r--r--src/core/image.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/image.c b/src/core/image.c
index ce8cf868b..3e236ca60 100644
--- a/src/core/image.c
+++ b/src/core/image.c
@@ -338,9 +338,12 @@ int image_exec ( struct image *image ) {
/* Sanity check */
assert ( image->flags & IMAGE_REGISTERED );
- /* Switch current working directory to be that of the image itself */
+ /* Switch current working directory to be that of the image
+ * itself, if applicable
+ */
old_cwuri = uri_get ( cwuri );
- churi ( image->uri );
+ if ( image->uri )
+ churi ( image->uri );
/* Preserve record of any currently-running image */
saved_current_image = current_image;