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

Commit 8a4333f3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Handle error from fopen_path in finish_recovery"

parents b97da5e0 85691421
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -504,12 +504,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();