Fix File::GetPermissions() to only return the permission bits.
llvm-svn: 195482
diff --git a/lldb/source/Host/common/File.cpp b/lldb/source/Host/common/File.cpp
index c8dff19..91fc8bd 100644
--- a/lldb/source/Host/common/File.cpp
+++ b/lldb/source/Host/common/File.cpp
@@ -286,7 +286,7 @@
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 @@
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