mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-31 21:21:08 +00:00
[Not part of build] Part of bug 98476. If the file doesn't exist, it's not an error.
This commit is contained in:
parent
347f4fccd8
commit
0858682e5d
@ -137,7 +137,8 @@ nsresult nsSafeSaveFile::PostProcessSave(void)
|
||||
// rename the previous save to .bak (i.e. <filename.js> to <filename.bak>)
|
||||
backupFile->SetLeafName(mTargetFileName);
|
||||
rv = backupFile->MoveTo(0, fileName);
|
||||
if (NS_FAILED(rv))
|
||||
// it's only an error if the file exists
|
||||
if ((NS_FAILED(rv)) && (rv != NS_ERROR_FILE_NOT_FOUND))
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user