X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fresource.c;h=f7a7916e5f0cc0ed94bcae2b30673b500f80db4b;hb=d3a6c0b6414f880a9cea4d8655570d9f556f319d;hp=98dc901f74068880256d9c1465a3f8a0d3f60dc9;hpb=140c0920af14b19292e8b7694bb91864c8f52f3c;p=wimlib diff --git a/src/resource.c b/src/resource.c index 98dc901f..f7a7916e 100644 --- a/src/resource.c +++ b/src/resource.c @@ -1013,7 +1013,7 @@ int extract_wim_resource_to_fd(const struct lookup_table_entry *lte, int fd, if (ret != 0) break; sha1_update(&ctx, buf, to_read); - if (full_write(fd, buf, to_read) < 0) { + if (full_write(fd, buf, to_read) < to_read) { ERROR_WITH_ERRNO("Error extracting WIM resource"); return WIMLIB_ERR_WRITE; } @@ -1334,8 +1334,9 @@ int write_metadata_resource(WIMStruct *w) if (ret != 0) goto out; - /* It's very likely the SHA1 message digest of the metadata resource, so - * re-insert the lookup table entry into the lookup table. */ + /* It's very likely the SHA1 message digest of the metadata resource + * changed, so re-insert the lookup table entry into the lookup table. + * */ lookup_table_unlink(w->lookup_table, lte); lookup_table_insert(w->lookup_table, lte);