- if (wim->hdr.total_parts != 1 && !(open_flags & WIMLIB_OPEN_FLAG_SPLIT_OK)) {
- ERROR("\"%"TS"\": This WIM is part %u of a %u-part WIM",
- wimfile, wim->hdr.part_number, wim->hdr.total_parts);
- return WIMLIB_ERR_SPLIT_UNSUPPORTED;
- }
+ if ((open_flags & WIMLIB_OPEN_FLAG_ERROR_IF_SPLIT) &&
+ (wim->hdr.total_parts != 1))
+ return WIMLIB_ERR_IS_SPLIT_WIM;