mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 01:29:50 +00:00
Don't use ".." to get the data-directory
`sys_ExecutablePathname().Parent()/".."/"data";` was causing realpath to pail on macOS, because ".." doesn't match any directory.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -129,7 +129,7 @@ bool ts_str_contains(const std::wstring& str1, const std::wstring& str2)
|
||||
// available, so we use sys_ExecutablePathname.
|
||||
OsPath DataDir()
|
||||
{
|
||||
return sys_ExecutablePathname().Parent()/".."/"data";
|
||||
return sys_ExecutablePathname().Parent().Parent()/"data";
|
||||
}
|
||||
|
||||
// Script-based testing setup:
|
||||
|
||||
Reference in New Issue
Block a user