Support/Unix/PathV2: Use 0770 instead of 0700 when creating a directory. Also use

the standard macros instead of octal notation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121093 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael J. Spencer 2010-12-07 01:23:29 +00:00
parent fbd1bbd7fa
commit 79c3c3a1de

View File

@ -157,7 +157,7 @@ error_code create_directory(const Twine &path, bool &existed) {
SmallString<128> path_storage;
StringRef p = path.toNullTerminatedStringRef(path_storage);
if (::mkdir(p.begin(), 0700) == -1) {
if (::mkdir(p.begin(), S_IRWXU | S_IRWXG) == -1) {
if (errno != errc::file_exists)
return error_code(errno, system_category());
existed = true;