diff options
author | Brad King <brad.king@kitware.com> | 2013-07-26 20:08:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-07-31 12:19:13 (GMT) |
commit | 102071f80cf4ad7aa97bf8a1618cfc6ee6689ab6 (patch) | |
tree | db05ed527f04506957049a7b087be6c038d98435 /Utilities/cmlibarchive/libarchive/archive_read_open_file.c | |
parent | 87402c995ed2460deb2f39e02acf77a0bb57f263 (diff) | |
parent | 35df7c8ba8854e97bd6994c4d1143f57535ed6f2 (diff) | |
download | CMake-102071f80cf4ad7aa97bf8a1618cfc6ee6689ab6.zip CMake-102071f80cf4ad7aa97bf8a1618cfc6ee6689ab6.tar.gz CMake-102071f80cf4ad7aa97bf8a1618cfc6ee6689ab6.tar.bz2 |
Merge branch 'libarchive-upstream' into update-libarchive
Conflicts:
Utilities/cmlibarchive/CMakeLists.txt
Utilities/cmlibarchive/libarchive/archive.h
Utilities/cmlibarchive/libarchive/archive_entry.h
Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c
Utilities/cmlibarchive/libarchive/archive_read_support_format_iso9660.c
Utilities/cmlibarchive/libarchive/archive_windows.h
Utilities/cmlibarchive/libarchive/archive_write_set_format_iso9660.c
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_read_open_file.c')
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive_read_open_file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_read_open_file.c b/Utilities/cmlibarchive/libarchive/archive_read_open_file.c index b1aac0a..3a33c25 100644 --- a/Utilities/cmlibarchive/libarchive/archive_read_open_file.c +++ b/Utilities/cmlibarchive/libarchive/archive_read_open_file.c @@ -108,11 +108,11 @@ static ssize_t file_read(struct archive *a, void *client_data, const void **buff) { struct read_FILE_data *mine = (struct read_FILE_data *)client_data; - ssize_t bytes_read; + size_t bytes_read; *buff = mine->buffer; bytes_read = fread(mine->buffer, 1, mine->block_size, mine->f); - if (bytes_read < 0) { + if (bytes_read < mine->block_size && ferror(mine->f)) { archive_set_error(a, errno, "Error reading file"); } return (bytes_read); |