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;