mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-04-19 02:01:28 +00:00
Update error messages
This commit is contained in:
parent
8edf556c9e
commit
93eb277a88
@ -438,7 +438,11 @@ public:
|
|||||||
|
|
||||||
~LZ4F_encoder() override {
|
~LZ4F_encoder() override {
|
||||||
size_t len = LZ4F_compressEnd(ctx, out_buf, outCapacity, nullptr);
|
size_t len = LZ4F_compressEnd(ctx, out_buf, outCapacity, nullptr);
|
||||||
bwrite(out_buf, len);
|
if (LZ4F_isError(len)) {
|
||||||
|
LOGE("LZ4F end of frame error: %s\n", LZ4F_getErrorName(len));
|
||||||
|
} else if (!bwrite(out_buf, len)) {
|
||||||
|
LOGE("LZ4F end of frame error: I/O error\n");
|
||||||
|
}
|
||||||
LZ4F_freeCompressionContext(ctx);
|
LZ4F_freeCompressionContext(ctx);
|
||||||
delete[] out_buf;
|
delete[] out_buf;
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,9 @@ bool chunk_out_stream::write(const void *_in, size_t len, bool final) {
|
|||||||
|
|
||||||
void chunk_out_stream::finalize() {
|
void chunk_out_stream::finalize() {
|
||||||
if (buf_off) {
|
if (buf_off) {
|
||||||
write_chunk(_buf, buf_off, true);
|
if (!write_chunk(_buf, buf_off, true)) {
|
||||||
|
LOGE("Error in finalize, file truncated\n");
|
||||||
|
}
|
||||||
delete[] _buf;
|
delete[] _buf;
|
||||||
_buf = nullptr;
|
_buf = nullptr;
|
||||||
buf_off = 0;
|
buf_off = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user