Windows GUI: transform file paths to use backslashes before passing them to viewer, as some windows viewers only understand backslashes
This commit is contained in:
@@ -69,6 +69,14 @@ void path_slashize(string& s)
|
||||
}
|
||||
}
|
||||
}
|
||||
void path_backslashize(string& s)
|
||||
{
|
||||
for (string::size_type i = 0; i < s.size(); i++) {
|
||||
if (s[i] == '/') {
|
||||
s[i] = '\\';
|
||||
}
|
||||
}
|
||||
}
|
||||
static bool path_strlookslikedrive(const string& s)
|
||||
{
|
||||
return s.size() == 2 && isalpha(s[0]) && s[1] == ':';
|
||||
|
||||
@@ -118,6 +118,7 @@ extern std::string path_pathtofileurl(const std::string& path);
|
||||
#ifdef _WIN32
|
||||
/// Convert \ separators to /
|
||||
void path_slashize(std::string& s);
|
||||
void path_backslashize(std::string& s);
|
||||
#endif
|
||||
|
||||
/// Lock/pid file class. This is quite close to the pidfile_xxx
|
||||
|
||||
Reference in New Issue
Block a user