]> wimlib.net Git - wimlib/blobdiff - src/win32_capture.c
Tweak reading of concat runs
[wimlib] / src / win32_capture.c
index f940179cd58f2aed786ed4637d5985ff5bb4050b..eb8bd7f9891f68ac038c964acc6a0746918d5446 100644 (file)
@@ -66,7 +66,6 @@ read_win32_file_prefix(const struct wim_lookup_table_entry *lte,
        void *out_buf;
        bool out_buf_malloced;
        u64 bytes_remaining;
-       const size_t stack_max = 32768;
 
        HANDLE hFile = win32_open_existing_file(lte->file_on_disk,
                                                FILE_READ_DATA);
@@ -78,7 +77,7 @@ read_win32_file_prefix(const struct wim_lookup_table_entry *lte,
 
        out_buf_malloced = false;
        if (cb) {
-               if (in_chunk_size <= stack_max) {
+               if (in_chunk_size <= STACK_MAX) {
                        out_buf = alloca(in_chunk_size);
                } else {
                        out_buf = MALLOC(in_chunk_size);
@@ -972,10 +971,10 @@ win32_capture_stream(const wchar_t *path,
                ret = win32_get_encrypted_file_size(path, &encrypted_size);
                if (ret)
                        goto out_free_spath;
-               lte->resource_entry.original_size = encrypted_size;
+               lte->size = encrypted_size;
        } else {
                lte->resource_location = RESOURCE_IN_FILE_ON_DISK;
-               lte->resource_entry.original_size = (u64)dat->StreamSize.QuadPart;
+               lte->size = (u64)dat->StreamSize.QuadPart;
        }
 
        u32 stream_id;