X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/runlisp/blobdiff_plain/1740a58ce3b204566212196810c36902b8b1b56c..6df280cddef4ab6cf14d7ec135c719e6c7d27040:/dump-runlisp-image.c diff --git a/dump-runlisp-image.c b/dump-runlisp-image.c index e33582d..9ed578d 100644 --- a/dump-runlisp-image.c +++ b/dump-runlisp-image.c @@ -547,6 +547,7 @@ static void notice_filename(const char *p, size_t sz) if (!node) { node = xmalloc(sizeof(*node)); treap_insert(&good, &path, node, p, sz); + if (verbose >= 3) moan("noticed non-junk file `%.*s'", (int)sz, p); } } @@ -996,6 +997,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;