Fix for regression bug 69166. No longer checking return of MoveTo call and returning UNEXPECTED_ERROR. r=dvedtiz, sr=mscott

This commit is contained in:
dbragg%netscape.com 2001-02-20 23:27:53 +00:00
Родитель 40ae3ada73
Коммит 9139d16e63
1 изменённых файлов: 6 добавлений и 4 удалений

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

@ -251,11 +251,13 @@ PRInt32 ReplaceFileNow(nsIFile* replacementFile, nsIFile* doomedFile )
// changed during the MoveTo call // changed during the MoveTo call
if (NS_FAILED(rv)) result = nsInstall::UNEXPECTED_ERROR; if (NS_FAILED(rv)) result = nsInstall::UNEXPECTED_ERROR;
rv = renamedDoomedFile->MoveTo(parent, uniqueLeafName); rv = renamedDoomedFile->MoveTo(parent, uniqueLeafName);
if (NS_FAILED(rv)) result = nsInstall::UNEXPECTED_ERROR;
renamedDoomedFile = parent; //MoveTo on Mac doesn't reset the tmpFile object to if (NS_SUCCEEDED(rv))
renamedDoomedFile->Append(uniqueLeafName); //the new name or location. That's why there's this {
//explict assignment and Append call. renamedDoomedFile = parent; //MoveTo on Mac doesn't reset the tmpFile object to
renamedDoomedFile->Append(uniqueLeafName); //the new name or location. That's why there's this
//explict assignment and Append call.
}
if (result == nsInstall::UNEXPECTED_ERROR) if (result == nsInstall::UNEXPECTED_ERROR)
return result; return result;