summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-28 20:31:09 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-28 20:31:09 +0300
commitbb87f2911b63eaf80e49d689bf52ecf2042ae098 (patch)
tree0778087134ec3c5a2370d417bcadb64a1dc6a9bc /src/client.cpp
parent4415cb66734e67dfcdf8924d354107d27fb70fee (diff)
downloadmanaplus-bb87f2911b63eaf80e49d689bf52ecf2042ae098.tar.gz
manaplus-bb87f2911b63eaf80e49d689bf52ecf2042ae098.tar.bz2
manaplus-bb87f2911b63eaf80e49d689bf52ecf2042ae098.tar.xz
manaplus-bb87f2911b63eaf80e49d689bf52ecf2042ae098.zip
Move from resourcemanager functions related to files into other files.
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 86f0d2f20..3161bae41 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -2229,13 +2229,12 @@ void Client::initUpdatesDir()
replaceAll(mUpdatesDir, ":", "_");
#endif
- const ResourceManager *const resman = ResourceManager::getInstance();
const std::string updateDir("/" + mUpdatesDir);
// Verify that the updates directory exists. Create if necessary.
- if (!resman->isDirectory(updateDir))
+ if (!PhysFs::isDirectory(updateDir.c_str()))
{
- if (!resman->mkdir(updateDir))
+ if (!PhysFs::mkdir(updateDir.c_str()))
{
#if defined WIN32
std::string newDir = mLocalDataDir + "\\" + mUpdatesDir;
@@ -2267,10 +2266,10 @@ void Client::initUpdatesDir()
}
const std::string updateLocal = updateDir + "/local";
const std::string updateFix = updateDir + "/fix";
- if (!resman->isDirectory(updateLocal))
- resman->mkdir(updateLocal);
- if (!resman->isDirectory(updateFix))
- resman->mkdir(updateFix);
+ if (!PhysFs::isDirectory(updateLocal.c_str()))
+ PhysFs::mkdir(updateLocal.c_str());
+ if (!PhysFs::isDirectory(updateFix.c_str()))
+ PhysFs::mkdir(updateFix.c_str());
}
void Client::initScreenshotDir()
@@ -2983,7 +2982,7 @@ void Client::setIcon()
#else
iconFile.append(".png");
#endif
- iconFile = ResourceManager::getPath(iconFile);
+ iconFile = Files::getPath(iconFile);
logger->log("Loading icon from file: %s", iconFile.c_str());
#ifdef WIN32