aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System/Win32/Path.inc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/System/Win32/Path.inc')
-rw-r--r--lib/System/Win32/Path.inc12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/System/Win32/Path.inc b/lib/System/Win32/Path.inc
index ce5fe2a..b5897053 100644
--- a/lib/System/Win32/Path.inc
+++ b/lib/System/Win32/Path.inc
@@ -46,6 +46,16 @@ namespace llvm {
namespace sys {
const char PathSeparator = ';';
+Path::Path(const std::string& p)
+ : path(p) {
+ FlipBackSlashes(path);
+}
+
+Path::Path(const char *StrStart, unsigned StrLen)
+ : path(StrStart, StrLen) {
+ FlipBackSlashes(path);
+}
+
bool
Path::isValid() const {
if (path.empty())
@@ -230,7 +240,7 @@ Path::isRootDirectory() const {
}
std::string Path::getDirname() const {
- return getDirnameCharSep(path, '\\');
+ return getDirnameCharSep(path, '/');
}
std::string