From 67c2551fae17d0f80cd4c83fa412281e997afd09 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Wed, 25 Dec 2013 11:58:49 -0600 Subject: [PATCH] wimlib_split(): Do not allow splitting WIMs containing packed streams --- src/split.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/split.c b/src/split.c index 01bb75fc..2688e7f6 100644 --- a/src/split.c +++ b/src/split.c @@ -148,10 +148,12 @@ add_stream_to_swm(struct wim_lookup_table_entry *lte, void *_swm_info) struct swm_info *swm_info = _swm_info; u64 stream_size; - /* We want the compressed size of the stream, but use the uncompressed - * size if the compressed size is not available or not relevant. */ - if (lte->resource_location == RESOURCE_IN_WIM && - (!lte_is_partial(lte) || lte->rspec->size_in_wim < lte->size)) + if (lte_is_partial(lte)) { + ERROR("Splitting of WIM containing packed streams is not supported.\n" + " Export it in the default format first."); + return WIMLIB_ERR_UNSUPPORTED; + } + if (lte->resource_location == RESOURCE_IN_WIM) stream_size = lte->rspec->size_in_wim; else stream_size = lte->size; -- 2.43.0