зеркало из https://github.com/mozilla/pjs.git
Fix for bug 164190. nsSafeSaveFile mistreats nsLocalFile, deleting files under one. Patch by sfraser, r=ccarlen, sr=alecf.
This commit is contained in:
Родитель
ef73c49861
Коммит
ed3a5e89ce
|
@ -110,15 +110,10 @@ nsresult nsSafeSaveFile::CreateBackup(PurgeBackupType aPurgeType)
|
|||
return rv;
|
||||
}
|
||||
|
||||
// Ugh, copy only takes a directory and a name, lets "unpackage" our target file...
|
||||
rv = mBackupFile->GetParent(getter_AddRefs(backupParent));
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
// and finally, copy the file (preserves file permissions)
|
||||
rv2 = NS_OK;
|
||||
do {
|
||||
rv = mTargetFile->CopyToNative(backupParent, mBackupFileName);
|
||||
rv = mTargetFile->CopyToNative(nsnull, mBackupFileName);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
break;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче