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

Commit b33a6f83 authored by Johan Harvyl's avatar Johan Harvyl Committed by android-build-merger
Browse files

Merge "Handle error from fopen_path in finish_recovery" am: 8a4333f3

am: a550ee0d

Change-Id: I291b2cdad02e2cd4b823b0d2c3e74c19f156bb67
parents e6a4195b a550ee0d
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -510,12 +510,14 @@ finish_recovery() {
        if (has_cache) {
            LOGI("Saving locale \"%s\"\n", locale);
            FILE* fp = fopen_path(LOCALE_FILE, "w");
            if (fp != NULL) {
                fwrite(locale, 1, len, fp);
                fflush(fp);
                fsync(fileno(fp));
                check_and_fclose(fp, LOCALE_FILE);
            }
        }
    }

    copy_logs();