зеркало из https://github.com/mozilla/pjs.git
Making directories be created with 0700 permission. r=dougt. Fix for bug 299133. a=uncle sam
This commit is contained in:
Родитель
c47054cdc9
Коммит
9fc0b1efca
|
@ -916,8 +916,13 @@ void nsFileSpec::MakeUnique(PRBool inCreateFile)
|
||||||
NS_NewNativeLocalFile(nsDependentCString(*this), PR_TRUE, getter_AddRefs(localFile));
|
NS_NewNativeLocalFile(nsDependentCString(*this), PR_TRUE, getter_AddRefs(localFile));
|
||||||
if (localFile)
|
if (localFile)
|
||||||
{
|
{
|
||||||
nsresult rv = localFile->CreateUnique(inCreateFile ? nsIFile::NORMAL_FILE_TYPE :
|
nsresult rv;
|
||||||
nsIFile::DIRECTORY_TYPE, 0600);
|
|
||||||
|
if (inCreateFile)
|
||||||
|
rv = localFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0600);
|
||||||
|
else
|
||||||
|
rv = localFile->CreateUnique(nsIFile::DIRECTORY_TYPE, 0700);
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv))
|
if (NS_SUCCEEDED(rv))
|
||||||
localFile->GetNativePath(path);
|
localFile->GetNativePath(path);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче