From 7ce2b58604c0faf5f63457870425795265394310 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 1 Nov 2009 16:41:30 -0500 Subject: [PATCH] Use Mac-friendly prefpath. --- Source/MacCompatibility.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.39.2