From: Ryan C. Gordon Date: Tue, 9 Aug 2005 01:20:31 +0000 (+0000) Subject: Fixed writing to prefpath. X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=0e06ef535cf522b55e2ba29178a4c188094fa038;p=lugaru.git Fixed writing to prefpath. --- diff --git a/Source/MacCompatibility.cpp b/Source/MacCompatibility.cpp index 8e0cae9..e1226b6 100644 --- a/Source/MacCompatibility.cpp +++ b/Source/MacCompatibility.cpp @@ -242,7 +242,7 @@ static int locateCorrectFile(char *buf, const char *mode) snprintf(prefpathfile, len, "%s/%s", prefpath, buf); int rc = locateCorrectCase(prefpathfile, iswriting); /* favor prefpath. */ - if (rc == 0) // found? + if ( (rc == 0) || ((rc == -1) && (iswriting)) ) // found or create? strcpy(buf, prefpathfile); else if ((rc < 0) && (!iswriting)) /* not writing? Try game dir... */ rc = locateCorrectCase(buf, iswriting);