Make chdir usage consistent with other source usage

This commit is contained in:
fickleheart 2020-04-09 20:52:23 -05:00
parent 614449298e
commit 6845aca6e5

View file

@ -909,7 +909,13 @@ static void IdentifyVersion(void)
} }
CONS_Printf("%s\n", srb2path); CONS_Printf("%s\n", srb2path);
chdir(srb2path);
#if defined (_WIN32)
SetCurrentDirectoryA(srb2path);
#else
if (chdir(srb2path) == -1)
I_OutputMsg("Couldn't change working directory\n");
#endif
} }
#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL) #if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL)