зеркало из https://github.com/mozilla/pjs.git
simplifying codepath to see if it fixes orange. we need to null out mTempFile in the non-existent target case too.
This commit is contained in:
Родитель
ab89d98489
Коммит
d5545a6bc5
|
@ -565,14 +565,13 @@ nsSafeFileOutputStream::Finish()
|
|||
if (NS_FAILED(mTargetFile->Equals(mTempFile, &equal)) || !equal)
|
||||
NS_ERROR("mTempFile not equal to mTargetFile");
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
} else {
|
||||
nsCAutoString targetFilename;
|
||||
rv = mTargetFile->GetNativeLeafName(targetFilename);
|
||||
|
||||
nsCAutoString targetFilename;
|
||||
rv = mTargetFile->GetNativeLeafName(targetFilename);
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
rv = mTempFile->MoveToNative(nsnull, targetFilename); // This will replace target
|
||||
if (NS_SUCCEEDED(rv))
|
||||
rv = mTempFile->MoveToNative(nsnull, targetFilename); // This will replace target
|
||||
}
|
||||
}
|
||||
else {
|
||||
mTempFile->Remove(PR_FALSE);
|
||||
|
|
Загрузка…
Ссылка в новой задаче