]> wimlib.net Git - wimlib/blobdiff - src/write.c
read_utf8_file_contents(): Move check for BOM here
[wimlib] / src / write.c
index 7302193034865cd5acca1a7b716deed0cfa4c2d5..bcf282ba3fe882126e929b208baa593c426d402a 100644 (file)
@@ -723,7 +723,7 @@ write_stream_uncompressed(struct wim_lookup_table_entry *lte,
        if (filedes_seek(out_fd, begin_offset) == -1)
                return 0;
 
-       ret = extract_stream_to_fd(lte, out_fd, lte->size);
+       ret = extract_full_stream_to_fd(lte, out_fd);
        if (ret) {
                /* Error reading the uncompressed data.  */
                if (out_fd->offset == begin_offset &&
@@ -953,8 +953,6 @@ write_stream_process_chunk(const void *chunk, size_t size, void *_ctx)
                        memcpy(&ctx->chunk_buf[ctx->chunk_buf_filled],
                               chunkptr, bytes_consumed);
 
-                       resized_chunk = ctx->chunk_buf;
-
                        chunkptr += bytes_consumed;
                        ctx->cur_read_res_offset += bytes_consumed;
                        ctx->chunk_buf_filled += bytes_consumed;