return WIMLIB_ERR_INVALID_IMAGE;
}
+ if (w->hdr.part_number != 1) {
+ ERROR("Cannot select an image from a non-first part of a split WIM");
+ return WIMLIB_ERR_SPLIT_UNSUPPORTED;
+ }
+
/* If a valid image is currently selected, it can be freed if it is not
* modified. */
if (w->current_image != WIMLIB_NO_IMAGE) {
info->total_bytes = 0;
info->has_integrity_table = wim->hdr.integrity.offset != 0;
info->opened_from_file = (wim->filename != NULL);
- info->is_readonly == (wim->hdr.flags & WIM_HDR_FLAG_READONLY) ||
+ info->is_readonly = (wim->hdr.flags & WIM_HDR_FLAG_READONLY) ||
(wim->hdr.total_parts != 1) ||
(wim->filename && taccess(wim->filename, W_OK));
info->has_rpfix = (wim->hdr.flags & WIM_HDR_FLAG_RP_FIX) != 0;