summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2008-05-27 15:53:21 +0000
committerDavid Athay <ko2fan@gmail.com>2008-05-27 15:53:21 +0000
commitc72778820c971184eef932cfea5654c66111f923 (patch)
tree05b60c64cf8f62d856980a810e365f801f761f00 /src/main.cpp
parent0367de5a7e6dad668bdb9de448dfc8b1f76ba1b2 (diff)
downloadmana-client-c72778820c971184eef932cfea5654c66111f923.tar.gz
mana-client-c72778820c971184eef932cfea5654c66111f923.tar.bz2
mana-client-c72778820c971184eef932cfea5654c66111f923.tar.xz
mana-client-c72778820c971184eef932cfea5654c66111f923.zip
Changed location of tmw directory on OSX
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index db9f85ac..1c4895fa 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -145,6 +145,12 @@ void init_engine(const Options &options)
#if defined WIN32
if (!CreateDirectory(homeDir.c_str(), 0) &&
GetLastError() != ERROR_ALREADY_EXISTS)
+#elif defined __APPLE__
+ // Use Application Directory instead of .tmw
+ homeDir = std::string(PHYSFS_getUserDir()) +
+ "/Library/Application Support/The Mana World";
+ if ((mkdir(homeDir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != 0) &&
+ (errno != EEXIST))
#else
// Checking if /home/user/.tmw folder exists.
if ((mkdir(homeDir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != 0) &&