bool is_windows_path(string const & p)
{
- return p.empty() ||
- (!contains(p, '\\') && (p.length() <= 1 || p[1] == ':'));
+ return p.empty() || (!contains(p, '\\') && p[0] != '/');
}
string convert_path_list(string const & p, PathStyle const & target)
{
+ if (p.empty())
+ return p;
+
char const * const pc = p.c_str();
PathStyle const actual = cygwin_posix_path_list_p(pc) ? posix : windows;
string external_path(string const & p)
{
+#ifdef X_DISPLAY_MISSING
return convert_path(p, PathStyle(windows));
+#else
+ return convert_path(p, PathStyle(posix));
+#endif
}
string external_path_list(string const & p)
{
+#ifdef X_DISPLAY_MISSING
return convert_path_list(p, PathStyle(windows));
+#else
+ return convert_path_list(p, PathStyle(posix));
+#endif
}