mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-29 06:30:25 +00:00
Windows paths can use either separator.
This commit is contained in:
parent
e613010b4b
commit
a573e58007
@ -214,15 +214,14 @@ std::string sanitize_log(const std::string& logstr)
|
||||
|
||||
#ifdef _WIN32
|
||||
const char* user_name = getenv("USERNAME");
|
||||
if(user_name != nullptr) {
|
||||
boost::replace_all(str, std::string("\\") + user_name + "\\", "\\USER\\");
|
||||
}
|
||||
#else
|
||||
const char* user_name = getenv("USER");
|
||||
#endif
|
||||
|
||||
if(user_name != nullptr) {
|
||||
boost::replace_all(str, std::string("/") + user_name + "/", "/USER/");
|
||||
boost::replace_all(str, std::string("\\") + user_name + "\\", "\\USER\\");
|
||||
}
|
||||
#endif
|
||||
|
||||
return str;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user