summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-02-11 19:08:11 +0300
committerAndrei Karas <akaras@inbox.ru>2017-02-11 19:19:38 +0300
commit245fb04a1e112cc8d0918a8660474299d5ce223c (patch)
treeeb5ab6266a4ff9551d2e08b9c14b61e353cd127f /src/gui/windows
parentf978c1bed85961e102951340669ca873328bcef3 (diff)
downloadmv-245fb04a1e112cc8d0918a8660474299d5ce223c.tar.gz
mv-245fb04a1e112cc8d0918a8660474299d5ce223c.tar.bz2
mv-245fb04a1e112cc8d0918a8660474299d5ce223c.tar.xz
mv-245fb04a1e112cc8d0918a8660474299d5ce223c.zip
Split virtfs api for add directories and archives.
Also remove useless resourcemanager functions for add/remove virtfs entries.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/updaterwindow.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index 645ec0e84..70ddd6897 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -754,7 +754,10 @@ void UpdaterWindow::loadManaPlusUpdates(const std::string &dir)
std::string fileName = std::string(fixPath).append(
"/").append(name);
if (!stat(fileName.c_str(), &statbuf))
- resourceManager->addToSearchPath(fileName, Append_false);
+ {
+ VirtFs::addZipToSearchPath(fileName,
+ Append_false);
+ }
}
}
}
@@ -777,7 +780,7 @@ void UpdaterWindow::unloadManaPlusUpdates(const std::string &dir)
const std::string file = std::string(
fixPath).append("/").append(name);
if (!stat(file.c_str(), &statbuf))
- resourceManager->removeFromSearchPath(file);
+ VirtFs::removeZipFromSearchPath(file);
}
}
}
@@ -789,27 +792,27 @@ void UpdaterWindow::addUpdateFile(const std::string &restrict path,
{
const std::string tmpPath = std::string(path).append("/").append(file);
if (append == Append_false)
- resourceManager->addToSearchPath(tmpPath, append);
+ VirtFs::addZipToSearchPath(tmpPath, append);
const std::string fixFile = std::string(fixPath).append("/").append(file);
struct stat statbuf;
if (!stat(fixFile.c_str(), &statbuf))
- resourceManager->addToSearchPath(fixFile, append);
+ VirtFs::addZipToSearchPath(fixFile, append);
if (append == Append_false)
- resourceManager->addToSearchPath(tmpPath, append);
+ VirtFs::addZipToSearchPath(tmpPath, append);
}
void UpdaterWindow::removeUpdateFile(const std::string &restrict path,
const std::string &restrict fixPath,
const std::string &restrict file)
{
- resourceManager->removeFromSearchPath(
+ VirtFs::removeZipFromSearchPath(
std::string(path).append("/").append(file));
const std::string fixFile = std::string(fixPath).append("/").append(file);
struct stat statbuf;
if (!stat(fixFile.c_str(), &statbuf))
- resourceManager->removeFromSearchPath(fixFile);
+ VirtFs::removeZipFromSearchPath(fixFile);
}
void UpdaterWindow::logic()
@@ -1134,7 +1137,10 @@ void UpdaterWindow::loadMods(const std::string &dir,
std::string fileName = std::string(fixPath).append(
"/").append(name);
if (!stat(fileName.c_str(), &statbuf))
- resourceManager->addToSearchPath(fileName, Append_false);
+ {
+ VirtFs::addZipToSearchPath(fileName,
+ Append_false);
+ }
}
}
}
@@ -1162,7 +1168,7 @@ void UpdaterWindow::loadDirMods(const std::string &dir)
const std::string &localDir = mod->getLocalDir();
if (!localDir.empty())
{
- resourceManager->addToSearchPath(dir + "/" + localDir,
+ VirtFs::addDirToSearchPath(dir + "/" + localDir,
Append_false);
}
}
@@ -1186,7 +1192,7 @@ void UpdaterWindow::unloadMods(const std::string &dir)
{
const std::string &localDir = mod->getLocalDir();
if (!localDir.empty())
- resourceManager->removeFromSearchPath(dir + "/" + localDir);
+ VirtFs::removeDirFromSearchPath(dir + "/" + localDir);
}
}
}