From 3c80d3df5ee229f200975940d11bb339e41c48e5 Mon Sep 17 00:00:00 2001 From: meep-eep Date: Wed, 7 Sep 2005 14:51:19 +0000 Subject: [PATCH] Changed %APPDATA% fallback to ./userdata instead of ../userdata, as we don't chdir() to the content dir anymore. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1870 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 2 ++ sc2/src/sc2code/libs/file/dirs.c | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 091cef8b2..c6c226d03 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,6 @@ Changes towards version 0.5: +- %APPDATA% fallback no longer to "../userdata", but to "./userdata", + as we don't chdir() to the content dir anymore. - SvdB - Commander Hayes flickering lights animation now properly reenabled when applicable (bug #777) - Alex - Refactored setupmenu code to use generic widgets - Michael diff --git a/sc2/src/sc2code/libs/file/dirs.c b/sc2/src/sc2code/libs/file/dirs.c index 4c22237e1..eaa7a49cf 100644 --- a/sc2/src/sc2code/libs/file/dirs.c +++ b/sc2/src/sc2code/libs/file/dirs.c @@ -282,11 +282,11 @@ expandPath (char *dest, size_t len, const char *src, int what) break; } - // fallback to "../userdata" + // fallback to "./userdata" +#define APPDATA_FALLBACK_STRING ".\\userdata" fprintf(stderr, "Warning: %%USERPROFILE%% is not set. " - "Falling back to \"..\\userdata\" for %%APPDATA%%" - "\n"); -#define APPDATA_FALLBACK_STRING "..\\userdata" + "Falling back to \"%s\" for %%APPDATA%%\n", + APPDATA_FALLBACK_STRING); CHECKLEN (buf, sizeof (APPDATA_FALLBACK_STRING) - 1); strcpy (bufptr, APPDATA_FALLBACK_STRING); bufptr += sizeof (APPDATA_FALLBACK_STRING) - 1;