From: Mark Wooding Date: Mon, 4 Mar 2024 16:06:22 +0000 (+0000) Subject: dump-runlisp-image.c (finish_job): Prevent fresh images from junking! X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/runlisp/commitdiff_plain/cf51f4b4b4e376229851b142411b81f7b0fd8877 dump-runlisp-image.c (finish_job): Prevent fresh images from junking! We'd notice the old images just fine, but the new ones used to get zapped until you ran a second pass, in which case the symlink was set correctly. --- diff --git a/dump-runlisp-image.c b/dump-runlisp-image.c index e33582d..836dc54 100644 --- a/dump-runlisp-image.c +++ b/dump-runlisp-image.c @@ -996,6 +996,12 @@ static void finish_job(struct job *job) ok = 0; break; } + /* Notice the image so that it doesn't get junked. */ + if (flags&AF_JUNK) { + p = strrchr(job->imghash, '/'); if (p) p++; else p = job->imghash; + notice_filename(p, strlen(p)); + } + /* Determine the basename of the final image. */ p = strrchr(job->imghash, '/'); if (p) p++; else p = job->imghash;