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 6ed926f6a2
commit c04a96be6b

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;
}