diff --git a/src/writer/contentProvider.cpp b/src/writer/contentProvider.cpp index 0896d90c9..48f0c2d9a 100644 --- a/src/writer/contentProvider.cpp +++ b/src/writer/contentProvider.cpp @@ -63,7 +63,7 @@ namespace zim return Blob(nullptr, 0); } - if(fd->readAt(buffer.get(), zim::zsize_t(sizeToRead), zim::offset_t(offset)).v == -1UL) { + if(fd->readAt(buffer.get(), zim::zsize_t(sizeToRead), zim::offset_t(offset)) == zim::zsize_t(-1)) { throw std::runtime_error("Error reading file " + filepath); } offset += sizeToRead;