You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (std::regex_match(p.native(), pathregex("^\\.\\.\\.+$"))) cleanPath /= ".";
127
-
else cleanPath /= p;
126
+
path_t::string_type str = p.native();
127
+
str.erase(std::remove_if(str.begin(), str.end(), [](path_t::string_type::value_type c)->bool {return c == '"' || c == '*' || c == ':' || c == '<' || c == '>' || c == '?' || c == '|' || c < 32;}), str.end());
128
+
if (std::regex_match(str, pathregex("^\\.\\.\\.+$"))) cleanPath /= ".";
129
+
else cleanPath /= path_t(str);
128
130
}
129
131
cleanPath = cleanPath.lexically_normal();
130
132
if (path_t::preferred_separator != (path_t::value_type)'/') {
@@ -246,15 +248,16 @@ static int fs_isReadOnly(lua_State *L) {
0 commit comments