diff options
author | Jeff Cohen <jeffc@jolt-lang.org> | 2007-04-07 20:47:27 +0000 |
---|---|---|
committer | Jeff Cohen <jeffc@jolt-lang.org> | 2007-04-07 20:47:27 +0000 |
commit | 31102896e5cecdc2b28edd52bb0599d3bc91d24e (patch) | |
tree | 2858a977027e2ace6ca07a46ab45a5859248336a /lib/System/Win32/Signals.inc | |
parent | b6006693d44b8bb91319f15b02a2e4af4f0ec995 (diff) | |
download | llvm-31102896e5cecdc2b28edd52bb0599d3bc91d24e.tar.gz llvm-31102896e5cecdc2b28edd52bb0599d3bc91d24e.tar.bz2 llvm-31102896e5cecdc2b28edd52bb0599d3bc91d24e.tar.xz |
Unbreak VC++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Win32/Signals.inc')
-rw-r--r-- | lib/System/Win32/Signals.inc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/System/Win32/Signals.inc b/lib/System/Win32/Signals.inc index 8adf7674fa..7da0c75113 100644 --- a/lib/System/Win32/Signals.inc +++ b/lib/System/Win32/Signals.inc @@ -101,12 +101,15 @@ bool sys::RemoveFileOnSignal(const sys::Path &Filename, std::string* ErrMsg) { // RemoveDirectoryOnSignal - The public API bool sys::RemoveDirectoryOnSignal(const sys::Path& path, std::string* ErrMsg) { // Not a directory? - const sys::FileStatus *Status = path.getFileStatus(false, ErrMsg); - if (!Status) + WIN32_FILE_ATTRIBUTE_DATA fi; + if (!GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &fi)) { + MakeErrMsg(ErrMsg, path.toString() + ": can't get status of file"); return true; - if (!Status->isDir) { + } + + if (!(fi.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { if (ErrMsg) - *ErrMsg = path.toString() + " is not a directory"; + *ErrMsg = path.toString() + ": not a directory"; return true; } |