зеркало из 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;
|
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)
|
// and finally, copy the file (preserves file permissions)
|
||||||
rv2 = NS_OK;
|
rv2 = NS_OK;
|
||||||
do {
|
do {
|
||||||
rv = mTargetFile->CopyToNative(backupParent, mBackupFileName);
|
rv = mTargetFile->CopyToNative(nsnull, mBackupFileName);
|
||||||
if (NS_SUCCEEDED(rv))
|
if (NS_SUCCEEDED(rv))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче