diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-06-05 15:44:46 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-06-05 15:44:46 +0000 |
commit | 3e0c1542409eda9afaf7427ad72facdecb91128c (patch) | |
tree | fb80488e06feed87e333a39bab048128a68d2207 /lib/System | |
parent | c21051ff96345be6a7af962c359ccbdd896da41e (diff) | |
download | external_llvm-3e0c1542409eda9afaf7427ad72facdecb91128c.tar.gz external_llvm-3e0c1542409eda9afaf7427ad72facdecb91128c.tar.bz2 external_llvm-3e0c1542409eda9afaf7427ad72facdecb91128c.zip |
For PR798:
Add support for Graphviz. Patch contributed by Anton Korobeynikov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28684 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System')
-rw-r--r-- | lib/System/Win32/Path.inc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/System/Win32/Path.inc b/lib/System/Win32/Path.inc index 27baf82756..f7be77f8c9 100644 --- a/lib/System/Win32/Path.inc +++ b/lib/System/Win32/Path.inc @@ -222,8 +222,9 @@ Path::isFile() const { BOOL rc = GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &fi); if (rc) return !(fi.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); - else if (GetLastError() != ERROR_NOT_FOUND) - ThrowError(std::string(path) + ": Can't get status: "); + else if (GetLastError() != ERROR_FILE_NOT_FOUND) { + ThrowError("isFile(): " + std::string(path) + ": Can't get status: "); + } return false; } @@ -233,8 +234,8 @@ Path::isDirectory() const { BOOL rc = GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &fi); if (rc) return fi.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY; - else if (GetLastError() != ERROR_NOT_FOUND) - ThrowError(std::string(path) + ": Can't get status: "); + else if (GetLastError() != ERROR_FILE_NOT_FOUND) + ThrowError("isDirectory(): " + std::string(path) + ": Can't get status: "); return false; } @@ -244,8 +245,8 @@ Path::isHidden() const { BOOL rc = GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &fi); if (rc) return fi.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN; - else if (GetLastError() != ERROR_NOT_FOUND) - ThrowError(std::string(path) + ": Can't get status: "); + else if (GetLastError() != ERROR_FILE_NOT_FOUND) + ThrowError("isHidden(): " + std::string(path) + ": Can't get status: "); return false; } @@ -336,7 +337,7 @@ void Path::getStatusInfo(StatusInfo& info) const { WIN32_FILE_ATTRIBUTE_DATA fi; if (!GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &fi)) - ThrowError(std::string(path) + ": Can't get status: "); + ThrowError("getStatusInfo():" + std::string(path) + ": Can't get status: "); info.fileSize = fi.nFileSizeHigh; info.fileSize <<= 32; |