From 59e3c1be7c07ffe611ab255b3336d99e3e35c17f Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Wed, 15 Mar 2017 19:16:18 +0100 Subject: [PATCH 1/2] Don't depend on shwlapi.dll when a simpler solution will do --- Util/Util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Util/Util.cpp b/Util/Util.cpp index 5bdded22..7d30b4e5 100644 --- a/Util/Util.cpp +++ b/Util/Util.cpp @@ -336,7 +336,7 @@ bool startsWith(const std::wstring& str, const wchar_t* value, size_t stringPos) bool isAbsolutePath(const std::wstring& path) { #ifdef _WIN32 - return PathIsRelativeW(path.c_str()) == FALSE; + return path.size() > 2 && path[1] == ':'; #else return path.size() >= 1 && path[0] == '/'; #endif From cf44bdf44f411d62305d087eeb5975cb662a54ef Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Wed, 15 Mar 2017 19:28:30 +0100 Subject: [PATCH 2/2] Add another case to the absolute path check --- Util/Util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Util/Util.cpp b/Util/Util.cpp index 7d30b4e5..96085bf3 100644 --- a/Util/Util.cpp +++ b/Util/Util.cpp @@ -336,7 +336,7 @@ bool startsWith(const std::wstring& str, const wchar_t* value, size_t stringPos) bool isAbsolutePath(const std::wstring& path) { #ifdef _WIN32 - return path.size() > 2 && path[1] == ':'; + return path.size() > 2 && (path[1] == ':' || (path[0] == '\\' && path[1] == '\\')); #else return path.size() >= 1 && path[0] == '/'; #endif