2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 23:07:42 +00:00

Additions to test

This commit is contained in:
Jack Andersen
2015-11-15 18:30:06 -10:00
parent 77c5f8c089
commit 6ae4f6ed11
14 changed files with 698 additions and 137 deletions

View File

@@ -28,16 +28,27 @@ FileStoreManager::FileStoreManager(const SystemString& domain)
HECL::MakeDir(path.c_str());
m_storeRoot = path;
#elif __APPLE__
const char* home = getenv("HOME");
if (!home)
Log.report(LogVisor::FatalError, "unable to locate $HOME for file store");
std::string path(home);
path += "/Library/Application Support/HECL Runtime";
if (mkdir(path.c_str(), 0755) && errno != EEXIST)
Log.report(LogVisor::FatalError, "unable to mkdir at %s", path.c_str());
path += '/' + domain;
if (mkdir(path.c_str(), 0755) && errno != EEXIST)
Log.report(LogVisor::FatalError, "unable to mkdir at %s", path.c_str());
m_storeRoot = path;
#else
const char* home = getenv("HOME");
if (!home)
Log.report(LogVisor::FatalError, "unable to locate $HOME for file store");
std::string path(home);
path += "/.heclrun";
if (mkdir(path.c_str(), 0755))
if (mkdir(path.c_str(), 0755) && errno != EEXIST)
Log.report(LogVisor::FatalError, "unable to mkdir at %s", path.c_str());
path += '/' + domain;
if (mkdir(path.c_str(), 0755))
if (mkdir(path.c_str(), 0755) && errno != EEXIST)
Log.report(LogVisor::FatalError, "unable to mkdir at %s", path.c_str());
m_storeRoot = path;
#endif