mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 07:14:31 +01:00
Replace Platform::GetAbsolutePath() with fs:: equivalent
This commit is contained in:
@@ -585,22 +585,6 @@ namespace Platform
|
||||
return c == '\\' || c == '/';
|
||||
}
|
||||
|
||||
utf8* GetAbsolutePath(utf8* buffer, size_t bufferSize, const utf8* relativePath)
|
||||
{
|
||||
auto relativePathW = String::ToWideChar(relativePath);
|
||||
wchar_t absolutePathW[MAX_PATH];
|
||||
DWORD length = GetFullPathNameW(
|
||||
relativePathW.c_str(), static_cast<DWORD>(std::size(absolutePathW)), absolutePathW, nullptr);
|
||||
if (length == 0)
|
||||
{
|
||||
return String::Set(buffer, bufferSize, relativePath);
|
||||
}
|
||||
|
||||
auto absolutePath = String::ToUtf8(absolutePathW);
|
||||
String::Set(buffer, bufferSize, absolutePath.c_str());
|
||||
return buffer;
|
||||
}
|
||||
|
||||
std::string ResolveCasing(std::string_view path, bool fileExists)
|
||||
{
|
||||
std::string result;
|
||||
|
||||
Reference in New Issue
Block a user