From: Eric Biggers Date: Fri, 4 Jul 2014 02:00:00 +0000 (-0500) Subject: Ensure WIM has filename before doing WIMBoot extraction X-Git-Tag: v1.7.1~68 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=f7a401210914f27b637cf201704144666f7cf851;ds=sidebyside Ensure WIM has filename before doing WIMBoot extraction --- diff --git a/src/extract.c b/src/extract.c index 0663edd7..edac626e 100644 --- a/src/extract.c +++ b/src/extract.c @@ -1511,12 +1511,16 @@ check_extract_flags(const WIMStruct *wim, int *extract_flags_p) } #endif -#ifndef __WIN32__ if (extract_flags & WIMLIB_EXTRACT_FLAG_WIMBOOT) { +#ifdef __WIN32__ + if (!wim->filename) + return WIMLIB_ERR_NO_FILENAME; +#else ERROR("WIMBoot extraction is only supported on Windows!"); return WIMLIB_ERR_UNSUPPORTED; - } #endif + } + if ((extract_flags & (WIMLIB_EXTRACT_FLAG_RPFIX | WIMLIB_EXTRACT_FLAG_NORPFIX |