diff options
author | Frederic Riss <friss@apple.com> | 2015-08-06 21:04:55 +0000 |
---|---|---|
committer | Frederic Riss <friss@apple.com> | 2015-08-06 21:04:55 +0000 |
commit | 6b9396c07054f0fbeec730d662ca76d111a2a46c (patch) | |
tree | 2551dfa167c60cb56d4746d6348807e97407caed /llvm/lib/Support/Unix/Path.inc | |
parent | fc573f33f639979ea4483954584d1ce18fb684bd (diff) | |
download | llvm-6b9396c07054f0fbeec730d662ca76d111a2a46c.zip llvm-6b9396c07054f0fbeec730d662ca76d111a2a46c.tar.gz llvm-6b9396c07054f0fbeec730d662ca76d111a2a46c.tar.bz2 |
Thread premissions through sys::fs::create_director{y|ies}
llvm-svn: 244268
Diffstat (limited to 'llvm/lib/Support/Unix/Path.inc')
-rw-r--r-- | llvm/lib/Support/Unix/Path.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc index 973d010..a77efcc 100644 --- a/llvm/lib/Support/Unix/Path.inc +++ b/llvm/lib/Support/Unix/Path.inc @@ -219,11 +219,12 @@ std::error_code current_path(SmallVectorImpl<char> &result) { return std::error_code(); } -std::error_code create_directory(const Twine &path, bool IgnoreExisting) { +std::error_code create_directory(const Twine &path, bool IgnoreExisting, + perms Perms) { SmallString<128> path_storage; StringRef p = path.toNullTerminatedStringRef(path_storage); - if (::mkdir(p.begin(), S_IRWXU | S_IRWXG) == -1) { + if (::mkdir(p.begin(), Perms) == -1) { if (errno != EEXIST || !IgnoreExisting) return std::error_code(errno, std::generic_category()); } |