[Not part of build] Part of bug 98476. If the file doesn't exist, it's not an error.

This commit is contained in:
bnesse%netscape.com 2002-05-01 19:08:46 +00:00
Родитель 347f4fccd8
Коммит 0858682e5d
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

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