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