aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System/Win32
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-08-22 23:54:35 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-08-22 23:54:35 +0000
commita34a15765d6a7bf3d5a324689f9fc3595d0c402a (patch)
tree0dc7da9aa13c539afe63f48f0bf1e4ab81cac83d /lib/System/Win32
parente1647f46982c67b68f40ec6d775f165cacf0a9dc (diff)
downloadexternal_llvm-a34a15765d6a7bf3d5a324689f9fc3595d0c402a.zip
external_llvm-a34a15765d6a7bf3d5a324689f9fc3595d0c402a.tar.gz
external_llvm-a34a15765d6a7bf3d5a324689f9fc3595d0c402a.tar.bz2
For PR797:
Adjust code to compensate for Path class interface change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29837 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Win32')
-rw-r--r--lib/System/Win32/Path.inc15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/System/Win32/Path.inc b/lib/System/Win32/Path.inc
index b40318f..2f2e852 100644
--- a/lib/System/Win32/Path.inc
+++ b/lib/System/Win32/Path.inc
@@ -326,11 +326,12 @@ static bool AddPermissionBits(const std::string& Filename, int bits) {
return true;
}
-void Path::makeReadableOnDisk() {
+bool Path::makeReadableOnDisk(std::string* ErrMsg) {
// All files are readable on Windows (ignoring security attributes).
+ return false;
}
-void Path::makeWriteableOnDisk() {
+void Path::makeWriteableOnDisk(std::string* ErrMsg) {
DWORD attr = GetFileAttributes(path.c_str());
// If it doesn't exist, we're done.
@@ -338,13 +339,17 @@ void Path::makeWriteableOnDisk() {
return;
if (attr & FILE_ATTRIBUTE_READONLY) {
- if (!SetFileAttributes(path.c_str(), attr & ~FILE_ATTRIBUTE_READONLY))
- ThrowError(std::string(path) + ": Can't make file writable: ");
+ if (!SetFileAttributes(path.c_str(), attr & ~FILE_ATTRIBUTE_READONLY)) {
+ MakeErrMsg(ErrMsg, std::string(path) + ": Can't make file writable: ");
+ return true;
+ }
}
+ return false;
}
-void Path::makeExecutableOnDisk() {
+bool Path::makeExecutableOnDisk(std::string* ErrMsg) {
// All files are executable on Windows (ignoring security attributes).
+ return false;
}
bool