From 0a21abd690948b1b964cf6055534b24b7e1139f9 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 16 Aug 2010 09:04:13 -0400 Subject: KWSys: Fix SplitPath for leading '\' on Windows Windows paths may begin with a single backslash when the drive letter is omitted. Recognize this as a root path component. --- Source/kwsys/SystemTools.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 3153235..1f3b5af 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -3143,9 +3143,9 @@ const char* SystemTools::SplitPathRootComponent(const char* p, } c += 2; } - else if(c[0] == '/') + else if(c[0] == '/' || c[0] == '\\') { - // Unix path. + // Unix path (or Windows path w/out drive letter). if(root) { *root = "/"; -- cgit v0.12