From f806b46cc967202db3d2fbf3384d0f037c13ed8a Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 21 Jun 2007 14:32:27 +0000 Subject: (svn r10246) -Fix (r10297): some forgotten money conversions and truncation issues. Thanks to benc for providing the patch. --- src/fileio.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/fileio.cpp') diff --git a/src/fileio.cpp b/src/fileio.cpp index b7c060fed..2b37dabf2 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -410,7 +410,9 @@ void ChangeWorkingDirectory(const char *exe) void DetermineBasePaths(const char *exe) { char tmp[MAX_PATH]; -#ifdef WITH_PERSONAL_DIR +#if defined(__MORPHOS__) || defined(__AMIGA__) || !defined(WITH_PERSONAL_DIR) + _searchpaths[SP_PERSONAL_DIR] = NULL; +#else const char *homedir = getenv("HOME"); if (homedir == NULL) { @@ -422,14 +424,16 @@ void DetermineBasePaths(const char *exe) AppendPathSeparator(tmp, MAX_PATH); _searchpaths[SP_PERSONAL_DIR] = strdup(tmp); -#else - _searchpaths[SP_PERSONAL_DIR] = NULL; #endif _searchpaths[SP_SHARED_DIR] = NULL; +#if defined(__MORPHOS__) || defined(__AMIGA__) + _searchpaths[SP_WORKING_DIR] = NULL; +#else getcwd(tmp, MAX_PATH); AppendPathSeparator(tmp, MAX_PATH); _searchpaths[SP_WORKING_DIR] = strdup(tmp); +#endif /* Change the working directory to that one of the executable */ ChangeWorkingDirectory((char*)exe); @@ -437,9 +441,13 @@ void DetermineBasePaths(const char *exe) AppendPathSeparator(tmp, MAX_PATH); _searchpaths[SP_BINARY_DIR] = strdup(tmp); +#if defined(__MORPHOS__) || defined(__AMIGA__) + _searchpaths[SP_INSTALLATION_DIR] = NULL; +#else snprintf(tmp, MAX_PATH, "%s", GLOBAL_DATA_DIR); AppendPathSeparator(tmp, MAX_PATH); _searchpaths[SP_INSTALLATION_DIR] = strdup(tmp); +#endif #ifdef WITH_COCOA extern void cocoaSetApplicationBundleDir(); cocoaSetApplicationBundleDir(); -- cgit v1.2.3-54-g00ecf