From a7435dad6df6f3b1581a22e11258b94ab368876e Mon Sep 17 00:00:00 2001 From: osm0sis Date: Sun, 12 Jan 2020 05:22:39 -0400 Subject: [PATCH] magiskboot: fix lzop detection --- native/jni/magiskboot/compress.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native/jni/magiskboot/compress.cpp b/native/jni/magiskboot/compress.cpp index 7d9ef061c..4cc7a6b5d 100644 --- a/native/jni/magiskboot/compress.cpp +++ b/native/jni/magiskboot/compress.cpp @@ -563,11 +563,11 @@ void decompress(char *infile, const char *outfile) { if (!strm) { format_t type = check_fmt(buf, len); + fprintf(stderr, "Detected format: [%s]\n", fmt2name[type]); + if (!COMPRESSED(type)) LOGE("Input file is not a supported compressed type!\n"); - fprintf(stderr, "Detected format: [%s]\n", fmt2name[type]); - /* If user does not provide outfile, infile has to be either * .[ext], or '-'. Outfile will be either or '-'. * If the input does not have proper format, abort */