diff options
author | rubidium <rubidium@openttd.org> | 2009-10-03 14:51:30 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-10-03 14:51:30 +0000 |
commit | f76ef2f6ce7875a2433e6fa008dac4b0adc63911 (patch) | |
tree | bd91bf412078ee6544e7cfff9b2ff7d0b34cdea0 /src | |
parent | afed4330dac0dd738eab604274952901dfba5537 (diff) | |
download | openttd-f76ef2f6ce7875a2433e6fa008dac4b0adc63911.tar.xz |
(svn r17686) -Fix [FS#3247]: make the -c <config file> location relative to the current directory instead of the directory of the binary
Diffstat (limited to 'src')
-rw-r--r-- | src/fileio.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fileio.cpp b/src/fileio.cpp index 925eb9c27..f8f4d0d70 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -874,6 +874,11 @@ void DetermineBasePaths(const char *exe) 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 |