Mercurial > hg > openttd
changeset 13179:ac1b795b8da4 draft
(svn r17686) -Fix [FS#3247]: make the -c <config file> location relative to the current directory instead of the directory of the binary
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sat, 03 Oct 2009 14:51:30 +0000 |
parents | ec4dc42ad747 |
children | d240f1a8e878 |
files | src/fileio.cpp |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -874,6 +874,11 @@ AppendPathSeparator(tmp, MAX_PATH); _searchpaths[SP_BINARY_DIR] = strdup(tmp); + if (_searchpaths[SP_WORKING_DIR] != NULL) { + /* Go back to the current working directory. */ + ChangeWorkingDirectory(_searchpaths[SP_WORKING_DIR]); + } + #if defined(__MORPHOS__) || defined(__AMIGA__) || defined(DOS) || defined(OS2) _searchpaths[SP_INSTALLATION_DIR] = NULL; #else