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

Commit afaf6e9e authored by Songchun Fan's avatar Songchun Fan
Browse files

[incremental native lib] skip writing to zero byte files

Test: adb install --incremental /google/data/rw/teams/tradefed/testdata/thirdparty_apps_stable/MX_Player_1.9.17.apk
BUG: 150795871
Change-Id: Idca09929f41424edb527b9b89dea1974c1f8ea46
parent 7695663d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1170,6 +1170,10 @@ bool IncrementalService::configureNativeBinaries(StorageId storage, std::string_
            // If one lib file fails to be created, abort others as well
            break;
        }
        // If it is a zero-byte file, skip data writing
        if (uncompressedLen == 0) {
            continue;
        }

        // Write extracted data to new file
        std::vector<uint8_t> libData(uncompressedLen);