Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ac91e1f authored by Daniel Zheng's avatar Daniel Zheng Committed by Gerrit Code Review
Browse files

Merge "libsnapshot: add compatibility check" into main

parents ec63f6f1 04ca59d6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -685,7 +685,8 @@ ssize_t CowReader::ReadData(const CowOperation* op, void* buffer, size_t buffer_
    } else {
        offset = GetCowOpSourceInfoData(*op);
    }
    if (!decompressor || op->data_length == header_.block_size) {
    if (!decompressor ||
        ((op->data_length == header_.block_size) && (header_.prefix.major_version == 3))) {
        CowDataStream stream(this, offset + ignore_bytes, op->data_length - ignore_bytes);
        return stream.ReadFully(buffer, buffer_size);
    }