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

Commit 185baeeb authored by Chris Soyars's avatar Chris Soyars
Browse files

Added ability to wipe_data and update_package at the same time.

This will be needed for a future project I am working on,
OpenUpdater.
parent 261dde9f
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -515,6 +515,13 @@ main(int argc, char **argv)
    }

    if (update_package != NULL) {
        if (wipe_data && erase_root("DATA:")) status = INSTALL_ERROR;
        status = install_package(update_package);
        if (status != INSTALL_SUCCESS) ui_print("Installation aborted.\n");
    } else if (update_package != NULL && wipe_data) {
        if (device_wipe_data()) status = INSTALL_ERROR;
        if (erase_root("DATA:")) status = INSTALL_ERROR;
        if (wipe_cache && erase_root("CACHE:")) status = INSTALL_ERROR;
        status = install_package(update_package);
        if (status != INSTALL_SUCCESS) ui_print("Installation aborted.\n");
    } else if (wipe_data) {