From 8995af565c496b32e69fbfe6aa1c76821d41a415 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Wed, 3 Jul 2013 12:26:17 +0000
Subject: [PATCH] better detection of absolute paths

---
 Common/StringUtils.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Common/StringUtils.cpp b/Common/StringUtils.cpp
index 1b496dfbc7..7c8d4cb9a5 100644
--- a/Common/StringUtils.cpp
+++ b/Common/StringUtils.cpp
@@ -77,7 +77,8 @@ std::string FixRelativePath(const std::string &reference, const std::string &in)
 {
   if(in.empty()) return "";
 
-  if(in[0] == '/' || in[0] == '\\' || (in.size() > 2 && in[1] == ':')){
+  if(in[0] == '/' || in[0] == '\\' ||
+     (in.size() > 3 && in[1] == ':' && (in[2] == '/' || in[2] == '\\'))){
     // do nothing: 'in' is an absolute path
     return in;
   }
-- 
GitLab