[llvm-commits] CVS: llvm/lib/System/Win32/Signals.inc
Chris Lattner
lattner at cs.uiuc.edu
Tue Aug 1 10:59:30 PDT 2006
Changes in directory llvm/lib/System/Win32:
Signals.inc updated: 1.20 -> 1.21
---
Log message:
Use getFileStatus instead of Path::isDirectory().
---
Diffs of the changes: (+8 -6)
Signals.inc | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
Index: llvm/lib/System/Win32/Signals.inc
diff -u llvm/lib/System/Win32/Signals.inc:1.20 llvm/lib/System/Win32/Signals.inc:1.21
--- llvm/lib/System/Win32/Signals.inc:1.20 Thu Jun 1 14:03:21 2006
+++ llvm/lib/System/Win32/Signals.inc Tue Aug 1 12:59:14 2006
@@ -96,17 +96,19 @@
// RemoveDirectoryOnSignal - The public API
void sys::RemoveDirectoryOnSignal(const sys::Path& path) {
+ // Not a directory?
+ sys::FileStatus Status;
+ if (path.getFileStatus(Status) || !Status.isDir)
+ return;
+
RegisterHandler();
if (CleanupExecuted)
throw std::string("Process terminating -- cannot register for removal");
- if (path.isDirectory()) {
- if (DirectoriesToRemove == NULL)
- DirectoriesToRemove = new std::vector<sys::Path>;
-
- DirectoriesToRemove->push_back(path);
- }
+ if (DirectoriesToRemove == NULL)
+ DirectoriesToRemove = new std::vector<sys::Path>;
+ DirectoriesToRemove->push_back(path);
LeaveCriticalSection(&CriticalSection);
}
More information about the llvm-commits
mailing list