From 8b58d8865c5bb38becca180671aeb689ba5a1422 Mon Sep 17 00:00:00 2001 From: Stan Date: Fri, 13 Jun 2025 17:28:01 +0200 Subject: [PATCH] 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. --- source/test_setup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/test_setup.cpp b/source/test_setup.cpp index 82ba40c16f..1bd4e5045a 100644 --- a/source/test_setup.cpp +++ b/source/test_setup.cpp @@ -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: