From cf51f4b4b4e376229851b142411b81f7b0fd8877 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Mon, 4 Mar 2024 16:06:22 +0000 Subject: [PATCH] dump-runlisp-image.c (finish_job): Prevent fresh images from junking! Organization: Straylight/Edgeware From: Mark Wooding 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. --- dump-runlisp-image.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- [mdw]