Skip to content

Commit

Permalink
[SYCLomatic] Require only necessary permission when checking permissi…
Browse files Browse the repository at this point in the history
…on of out root directory (#1956)

Signed-off-by: intwanghao <[email protected]>
  • Loading branch information
intwanghao authored May 9, 2024
1 parent 3c389fc commit 7f1d79d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/DPCT/Utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4860,7 +4860,7 @@ void createDirectories(const clang::tooling::UnifiedPath &FilePath,
if (IgnoreExisting &&
llvm::sys::fs::is_directory(FilePath.getCanonicalPath())) {
auto perm = sys::fs::getPermissions(FilePath.getCanonicalPath());
if (perm && (perm.get() & sys::fs::perms::owner_all)) {
if (perm && (perm.get() & sys::fs::perms::owner_write)) {
return;
}
}
Expand Down

0 comments on commit 7f1d79d

Please sign in to comment.