From f76ef2f6ce7875a2433e6fa008dac4b0adc63911 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 3 Oct 2009 14:51:30 +0000 Subject: [PATCH] (svn r17686) -Fix [FS#3247]: make the -c location relative to the current directory instead of the directory of the binary --- src/fileio.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/fileio.cpp b/src/fileio.cpp index 925eb9c273..f8f4d0d70d 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