1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

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

the standard macros instead of octal notation.

llvm-svn: 121093
This commit is contained in:
Michael J. Spencer 2010-12-07 01:23:29 +00:00
parent cfd185355b
commit 6874ebd344

View File

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