Support/Unix/PathV2: Use 0770 instead of 0700 when creating a directory. Also use
authorMichael J. Spencer <bigcheesegs@gmail.com>
Tue, 7 Dec 2010 01:23:29 +0000 (01:23 +0000)
committerMichael J. Spencer <bigcheesegs@gmail.com>
Tue, 7 Dec 2010 01:23:29 +0000 (01:23 +0000)
the standard macros instead of octal notation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121093 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/Unix/PathV2.inc

index 1362237199bbb46e590f227ee7d58b0afcd3f45e..c547e6606f776998411d9d599dce27cf5099da8b 100644 (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;