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

Massive fmtlib refactor

This commit is contained in:
Jack Andersen
2019-07-19 18:22:58 -10:00
parent b483acb8d3
commit 6988f86672
37 changed files with 656 additions and 842 deletions

View File

@@ -16,7 +16,7 @@ FileStoreManager::FileStoreManager(SystemStringView domain) : m_domain(domain) {
#if !WINDOWS_STORE
WCHAR home[MAX_PATH];
if (!SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_PROFILE, NULL, 0, home)))
Log.report(logvisor::Fatal, _SYS_STR("unable to locate profile for file store"));
Log.report(logvisor::Fatal, fmt(_SYS_STR("unable to locate profile for file store")));
SystemString path(home);
#else
@@ -34,15 +34,15 @@ FileStoreManager::FileStoreManager(SystemStringView domain) : m_domain(domain) {
#else
const char* home = getenv("HOME");
if (!home)
Log.report(logvisor::Fatal, "unable to locate $HOME for file store");
Log.report(logvisor::Fatal, fmt("unable to locate $HOME for file store"));
std::string path(home);
path += "/.heclrun";
if (mkdir(path.c_str(), 0755) && errno != EEXIST)
Log.report(logvisor::Fatal, "unable to mkdir at %s", path.c_str());
Log.report(logvisor::Fatal, fmt("unable to mkdir at {}"), path);
path += '/';
path += domain.data();
if (mkdir(path.c_str(), 0755) && errno != EEXIST)
Log.report(logvisor::Fatal, "unable to mkdir at %s", path.c_str());
Log.report(logvisor::Fatal, fmt("unable to mkdir at {}"), path);
m_storeRoot = path;
#endif
}