X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=programs%2Fimagex.c;h=79eb08db2d73c5909c71306949f91973e4bfc02e;hp=854be037e42ac281dd25eba5685f017bee191d69;hb=0e9c01aa6a9fac4060d5a6751f159682681d5486;hpb=e9fa56fa6e181ae15282a2fcf0dbfa0b7c59cd81 diff --git a/programs/imagex.c b/programs/imagex.c index 854be037..79eb08db 100644 --- a/programs/imagex.c +++ b/programs/imagex.c @@ -1519,7 +1519,7 @@ imagex_apply(int argc, tchar **argv) num_images = wimlib_get_num_images(w); if (argc == 2 && num_images != 1) { imagex_error(T("\"%"TS"\" contains %d images; Please select one " - "(or all)"), wimfile, num_images); + "(or all)."), wimfile, num_images); usage(APPLY); ret = -1; goto out; @@ -2934,6 +2934,7 @@ imagex_update(int argc, tchar **argv) size_t cmd_file_nchars; struct wimlib_update_command *cmds; size_t num_cmds; + int num_images; const tchar *config_file = NULL; tchar *config_str; @@ -3017,6 +3018,15 @@ imagex_update(int argc, tchar **argv) if (ret) goto out_wimlib_free; + num_images = wimlib_get_num_images(wim); + if (argc == 1 && num_images != 1) { + imagex_error(T("\"%"TS"\" contains %d images; Please select one."), + wimfile, num_images); + usage(UPDATE); + ret = -1; + goto out_wimlib_free; + } + /* Parse capture configuration file if specified */ if (config_file) { size_t config_len;