Fix shit
This commit is contained in:
@@ -9,10 +9,11 @@ SString FilePath::FinalizePath(const SString& path)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
std::wregex r(L"/+");
|
||||
return std::regex_replace(path.str(), r, L"\\");
|
||||
SString str = std::regex_replace(path.str(), r, L"\\");
|
||||
std::wregex r2(L"\\\\+");
|
||||
return std::regex_replace(str.str(), r2, L"\\\\");
|
||||
#else
|
||||
std::wregex r(L"\\+");
|
||||
return std::regex_replace(path.str(), r, L"/");
|
||||
a
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -92,13 +93,13 @@ const SString FilePath::DirSep = "/";
|
||||
|
||||
FilePath& FilePath::Append(const FilePath& filePath)
|
||||
{
|
||||
_path += (DirSep + filePath);
|
||||
_path = FinalizePath(_path + DirSep + filePath);
|
||||
return *this;
|
||||
}
|
||||
|
||||
FilePath& FilePath::Append(const SString& path)
|
||||
{
|
||||
_path += (DirSep + FinalizePath(path));
|
||||
_path = FinalizePath(_path + DirSep + path);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user