Merge branch 'fix-1310' into 'next'

Convert waddir to an absolute path

Closes #1310

See merge request STJr/SRB2!2538
This commit is contained in:
Alam Ed Arias 2025-01-10 01:10:09 +00:00
commit 9756b9e19b
2 changed files with 4 additions and 0 deletions

View file

@ -1453,8 +1453,10 @@ const char *I_LocateWad(void)
{
// change to the directory where we found srb2.pk3
#if defined (_WIN32)
waddir = _fullpath(NULL, waddir, MAX_PATH);
SetCurrentDirectoryA(waddir);
#else
waddir = realpath(waddir, NULL);
if (chdir(waddir) == -1)
I_OutputMsg("Couldn't change working directory\n");
#endif

View file

@ -3087,8 +3087,10 @@ const char *I_LocateWad(void)
{
// change to the directory where we found srb2.pk3
#if defined (_WIN32)
waddir = _fullpath(NULL, waddir, MAX_PATH);
SetCurrentDirectoryA(waddir);
#else
waddir = realpath(waddir, NULL);
if (chdir(waddir) == -1)
I_OutputMsg("Couldn't change working directory\n");
#endif