Merge "Handle error from fopen_path in finish_recovery" am: 8a4333f3b9
am: a550ee0df7
Change-Id: I291b2cdad02e2cd4b823b0d2c3e74c19f156bb67
This commit is contained in:
+6
-4
@@ -510,10 +510,12 @@ finish_recovery() {
|
|||||||
if (has_cache) {
|
if (has_cache) {
|
||||||
LOGI("Saving locale \"%s\"\n", locale);
|
LOGI("Saving locale \"%s\"\n", locale);
|
||||||
FILE* fp = fopen_path(LOCALE_FILE, "w");
|
FILE* fp = fopen_path(LOCALE_FILE, "w");
|
||||||
fwrite(locale, 1, len, fp);
|
if (fp != NULL) {
|
||||||
fflush(fp);
|
fwrite(locale, 1, len, fp);
|
||||||
fsync(fileno(fp));
|
fflush(fp);
|
||||||
check_and_fclose(fp, LOCALE_FILE);
|
fsync(fileno(fp));
|
||||||
|
check_and_fclose(fp, LOCALE_FILE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user