summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/common/File.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-11-22 18:46:55 +0000
committerGreg Clayton <gclayton@apple.com>2013-11-22 18:46:55 +0000
commitc02938269026409be8e619548286d7d8a3876885 (patch)
tree1902008c869d6740b17c4a6c679e4f516a7a54eb /lldb/source/Host/common/File.cpp
parent6d4130e7d9e81e806ec110839de9c65b2ed0d118 (diff)
downloadbcm5719-llvm-c02938269026409be8e619548286d7d8a3876885.tar.gz
bcm5719-llvm-c02938269026409be8e619548286d7d8a3876885.zip
Fix File::GetPermissions() to only return the permission bits.
llvm-svn: 195482
Diffstat (limited to 'lldb/source/Host/common/File.cpp')
-rw-r--r--lldb/source/Host/common/File.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Host/common/File.cpp b/lldb/source/Host/common/File.cpp
index c8dff198cb7..91fc8bd6b7b 100644
--- a/lldb/source/Host/common/File.cpp
+++ b/lldb/source/Host/common/File.cpp
@@ -286,7 +286,7 @@ File::GetPermissions (const char *path, Error &error)
else
{
error.Clear();
- return file_stats.st_mode; // All bits from lldb_private::File::Permissions match those in POSIX mode bits
+ return file_stats.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
}
}
else
@@ -311,7 +311,7 @@ File::GetPermissions(Error &error) const
else
{
error.Clear();
- return file_stats.st_mode; // All bits from lldb_private::File::Permissions match those in POSIX mode bits
+ return file_stats.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
}
}
else
OpenPOWER on IntegriCloud