Commit 9dd824ba authored by Denis Krjuchkov's avatar Denis Krjuchkov

fs/Traits.hxx: don't use g_path_is_absolute

parent d744ea3f
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "Compiler.h" #include "Compiler.h"
#ifdef WIN32 #ifdef WIN32
#include <glib.h> #include "util/CharUtil.hxx"
#endif #endif
#include <string> #include <string>
...@@ -62,23 +62,21 @@ struct PathTraits { ...@@ -62,23 +62,21 @@ struct PathTraits {
gcc_pure gcc_pure
static bool IsAbsoluteFS(const_pointer p) { static bool IsAbsoluteFS(const_pointer p) {
assert(p != nullptr); assert(p != nullptr);
#ifdef WIN32 #ifdef WIN32
return g_path_is_absolute(p); if (IsAlphaASCII(p[0]) && p[1] == ':' && IsSeparatorFS(p[2]))
#else return true;
return IsSeparatorFS(*p);
#endif #endif
return IsSeparatorFS(*p);
} }
gcc_pure gcc_pure
static bool IsAbsoluteUTF8(const char *p) { static bool IsAbsoluteUTF8(const char *p) {
assert(p != nullptr); assert(p != nullptr);
#ifdef WIN32 #ifdef WIN32
return g_path_is_absolute(p); if (IsAlphaASCII(p[0]) && p[1] == ':' && IsSeparatorUTF8(p[2]))
#else return true;
return IsSeparatorUTF8(*p);
#endif #endif
return IsSeparatorUTF8(*p);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment