[Lldb-commits] [lldb] r195482 - Fix File::GetPermissions() to only return the permission bits.
Greg Clayton
gclayton at apple.com
Fri Nov 22 10:46:55 PST 2013
Author: gclayton
Date: Fri Nov 22 12:46:55 2013
New Revision: 195482
URL: http://llvm.org/viewvc/llvm-project?rev=195482&view=rev
Log:
Fix File::GetPermissions() to only return the permission bits.
Modified:
lldb/trunk/source/Host/common/File.cpp
Modified: lldb/trunk/source/Host/common/File.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/File.cpp?rev=195482&r1=195481&r2=195482&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/File.cpp (original)
+++ lldb/trunk/source/Host/common/File.cpp Fri Nov 22 12:46:55 2013
@@ -286,7 +286,7 @@ File::GetPermissions (const char *path,
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
More information about the lldb-commits
mailing list