Bug 681085 - sync cache map file after writing the header

This commit is contained in:
Michal Novotny
2011-08-23 00:24:23 +02:00
parent 86fd4a1ebc
commit 15b3928571

View File

@@ -234,7 +234,10 @@ nsDiskCacheMap::FlushHeader()
if (sizeof(nsDiskCacheHeader) != bytesWritten) {
return NS_ERROR_UNEXPECTED;
}
PRStatus err = PR_Sync(mMapFD);
if (err != PR_SUCCESS) return NS_ERROR_UNEXPECTED;
return NS_OK;
}