Skip to content
Snippets Groups Projects
Commit 8995af56 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

better detection of absolute paths

parent 0b918815
No related branches found
No related tags found
No related merge requests found
...@@ -77,7 +77,8 @@ std::string FixRelativePath(const std::string &reference, const std::string &in) ...@@ -77,7 +77,8 @@ std::string FixRelativePath(const std::string &reference, const std::string &in)
{ {
if(in.empty()) return ""; 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 // do nothing: 'in' is an absolute path
return in; return in;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment