From: Ryan C. Gordon Date: Sun, 1 Nov 2009 21:41:30 +0000 (-0500) Subject: Use Mac-friendly prefpath. X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=7ce2b58604c0faf5f63457870425795265394310;p=lugaru.git Use Mac-friendly prefpath. --- diff --git a/Source/MacCompatibility.cpp b/Source/MacCompatibility.cpp index a6b4d70..d95664c 100644 --- a/Source/MacCompatibility.cpp +++ b/Source/MacCompatibility.cpp @@ -192,7 +192,11 @@ static inline const char *getPrefPath(void) if (homedir == NULL) homedir = "."; // oh well. +#if (defined(__APPLE__) && defined(__MACH__)) + const char *PREFPATHNAME = "Library/Application Support/Lugaru"; +#else const char *PREFPATHNAME = ".lugaru"; +#endif size_t len = strlen(homedir) + strlen(PREFPATHNAME) + 2; prefpath = new char[len]; snprintf(prefpath, len, "%s/%s", homedir, PREFPATHNAME);