зеркало из 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));
|
||||
if (localFile)
|
||||
{
|
||||
nsresult rv = localFile->CreateUnique(inCreateFile ? nsIFile::NORMAL_FILE_TYPE :
|
||||
nsIFile::DIRECTORY_TYPE, 0600);
|
||||
nsresult rv;
|
||||
|
||||
if (inCreateFile)
|
||||
rv = localFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0600);
|
||||
else
|
||||
rv = localFile->CreateUnique(nsIFile::DIRECTORY_TYPE, 0700);
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
localFile->GetNativePath(path);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче