From 9fc0b1efca582ed2fb4f1156141455a1ac8983b7 Mon Sep 17 00:00:00 2001 From: "dougt%meer.net" Date: Mon, 4 Jul 2005 16:46:50 +0000 Subject: [PATCH] Making directories be created with 0700 permission. r=dougt. Fix for bug 299133. a=uncle sam --- xpcom/obsolete/nsFileSpec.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xpcom/obsolete/nsFileSpec.cpp b/xpcom/obsolete/nsFileSpec.cpp index e835cf223a5..5ccda3ab5e0 100644 --- a/xpcom/obsolete/nsFileSpec.cpp +++ b/xpcom/obsolete/nsFileSpec.cpp @@ -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); }