aboutsummaryrefslogtreecommitdiff
path: root/lib/System/Win32/Path.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/System/Win32/Path.cpp')
-rw-r--r--lib/System/Win32/Path.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/System/Win32/Path.cpp b/lib/System/Win32/Path.cpp
index 24cfc46518..21e07c8ae1 100644
--- a/lib/System/Win32/Path.cpp
+++ b/lib/System/Win32/Path.cpp
@@ -587,8 +587,8 @@ CopyFile(const sys::Path &Dest, const sys::Path &Src) {
}
void
-Path::makeUnique() {
- if (!exists())
+Path::makeUnique( bool reuse_current ) {
+ if (reuse_current && !exists())
return; // File doesn't exist already, just use it!
Path dir (*this);
@@ -602,6 +602,16 @@ Path::makeUnique() {
path = newName;
}
+bool
+Path::createTemporaryFile(bool reuse_current) {
+ // Make sure we're dealing with a file
+ if (!isFile())
+ return false;
+
+ // Make this into a unique file name
+ makeUnique( reuse_current );
+}
+
}
}