add_flags |= WIMLIB_ADD_FLAG_WIMBOOT;
break;
case IMAGEX_UNSAFE_COMPACT_OPTION:
+ if (cmd != CMD_APPEND) {
+ imagex_error(T("'--unsafe-compact' is only "
+ "valid for append!"));
+ goto out_err;
+ }
write_flags |= WIMLIB_WRITE_FLAG_UNSAFE_COMPACT;
break;
default:
goto out_free_src_wim;
}
+ if (write_flags & WIMLIB_WRITE_FLAG_UNSAFE_COMPACT) {
+ imagex_error(T("'--unsafe-compact' is only valid when "
+ "exporting to an existing WIM file!"));
+ ret = -1;
+ goto out_free_src_wim;
+ }
+
/* dest_wimfile is not an existing file, so create a new WIM. */
if (compression_type == WIMLIB_COMPRESSION_TYPE_INVALID) {