Skip to content

Commit

Permalink
Merge pull request #95 from hrydgard/isAbsolutePath-fix
Browse files Browse the repository at this point in the history
Don't depend on shwlapi.dll when a simpler solution will do
  • Loading branch information
Kingcom committed Mar 15, 2017
2 parents fb8f2ad + cf44bdf commit 770365d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Util/Util.cpp
Expand Up @@ -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] == ':' || (path[0] == '\\' && path[1] == '\\'));
#else
return path.size() >= 1 && path[0] == '/';
#endif
Expand Down

0 comments on commit 770365d

Please sign in to comment.