mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 07:45:36 +00:00
Make sure that local path has a trailing slash on Linux and Windows
This commit is contained in:
parent
f4ac32efc9
commit
b0d687964e
2 changed files with 5 additions and 4 deletions
|
@ -83,7 +83,8 @@ namespace Files
|
|||
|
||||
std::filesystem::path LinuxPath::getLocalPath() const
|
||||
{
|
||||
auto localPath = std::filesystem::current_path();
|
||||
auto localPath = std::filesystem::current_path() / "";
|
||||
|
||||
static const std::filesystem::path statusPaths[]
|
||||
= { "/proc/self/exe", "/proc/self/file", "/proc/curproc/exe", "/proc/curproc/file" };
|
||||
|
||||
|
@ -93,7 +94,7 @@ namespace Files
|
|||
const auto binPath = read_symlink(path, ec);
|
||||
if (ec.value() != -1)
|
||||
{
|
||||
localPath = binPath.parent_path();
|
||||
localPath = binPath.parent_path() / "";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,13 +70,13 @@ namespace Files
|
|||
|
||||
std::filesystem::path WindowsPath::getLocalPath() const
|
||||
{
|
||||
std::filesystem::path localPath = std::filesystem::current_path();
|
||||
std::filesystem::path localPath = std::filesystem::current_path() / "";
|
||||
|
||||
WCHAR path[MAX_PATH + 1] = {};
|
||||
|
||||
if (GetModuleFileNameW(nullptr, path, MAX_PATH + 1) > 0)
|
||||
{
|
||||
localPath = std::filesystem::path(path).parent_path();
|
||||
localPath = std::filesystem::path(path).parent_path() / "";
|
||||
}
|
||||
|
||||
// lookup exe path
|
||||
|
|
Loading…
Reference in a new issue