diff options
author | Jesusaves <cpntb1@ymail.com> | 2024-02-10 10:28:18 -0300 |
---|---|---|
committer | Jesusalva Jesusalva <jesusalva@themanaworld.org> | 2024-02-11 03:53:32 +0000 |
commit | 9e076e849643a8decd8125ad3576a31c806206c4 (patch) | |
tree | bcdc51804b8c101cbda8bfb42a75695149f5198f | |
parent | 365e617e8978f6579a12c41fe0d11a655ec2d18e (diff) | |
download | manaverse-9e076e849643a8decd8125ad3576a31c806206c4.tar.gz manaverse-9e076e849643a8decd8125ad3576a31c806206c4.tar.bz2 manaverse-9e076e849643a8decd8125ad3576a31c806206c4.tar.xz manaverse-9e076e849643a8decd8125ad3576a31c806206c4.zip |
Get rid of manaverse-owned updates. (Coverage warning!)
This leaves some dead corpses behind, cleanup after is advised.
Reverts b9e27e9563e32a17cd80142ce05b5770479cc709
For short, the client should not be keeping an override on what server shows.
This function (backdoor) also don't exist on Mana client.
-rw-r--r-- | src/gui/windows/updaterwindow.cpp | 73 | ||||
-rw-r--r-- | src/gui/windows/updaterwindow.h | 4 |
2 files changed, 3 insertions, 74 deletions
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp index 15773e3d4..283df5ecf 100644 --- a/src/gui/windows/updaterwindow.cpp +++ b/src/gui/windows/updaterwindow.cpp @@ -680,7 +680,6 @@ void UpdaterWindow::loadUpdates() file.name, Append_false); } - loadManaPlusUpdates(mUpdatesDir); loadMods(mUpdatesDir, mUpdateFiles); } @@ -713,7 +712,6 @@ void UpdaterWindow::loadLocalUpdates(const std::string &dir) file.name, Append_false); } - loadManaPlusUpdates(dir); loadMods(dir, updateFiles); } @@ -728,72 +726,6 @@ void UpdaterWindow::unloadUpdates(const std::string &dir) updateFiles = loadTxtFile(pathJoin(dir, txtUpdateFile)); } - - const std::string fixPath = dir + "/fix"; - for (unsigned int updateIndex = 0, - fsz = CAST_U32(updateFiles.size()); - updateIndex < fsz; - updateIndex++) - { - UpdaterWindow::removeUpdateFile(dir, - fixPath, - updateFiles[updateIndex].name); - } - unloadManaPlusUpdates(dir); -} - -void UpdaterWindow::loadManaPlusUpdates(const std::string &dir) -{ - std::string fixPath = dir + "/fix"; - STD_VECTOR<UpdateFile> updateFiles = loadXMLFile( - pathJoin(fixPath, xmlUpdateFile), - false); - - for (unsigned int updateIndex = 0, - fsz = CAST_U32(updateFiles.size()); - updateIndex < fsz; - updateIndex++) - { - const UpdateFile &file = updateFiles[updateIndex]; - if (!file.group.empty()) - continue; - const std::string name = file.name; - if (strStartWith(name, "manaplus_")) - { - struct stat statbuf; - std::string fileName = pathJoin(fixPath, - name); - if (stat(fileName.c_str(), &statbuf) == 0) - { - VirtFs::mountZip(fileName, - Append_false); - } - } - } -} - -void UpdaterWindow::unloadManaPlusUpdates(const std::string &dir) -{ - const std::string fixPath = dir + "/fix"; - const STD_VECTOR<UpdateFile> updateFiles = loadXMLFile( - pathJoin(fixPath, xmlUpdateFile), - true); - - for (unsigned int updateIndex = 0, - fsz = CAST_U32(updateFiles.size()); - updateIndex < fsz; - updateIndex++) - { - std::string name = updateFiles[updateIndex].name; - if (strStartWith(name, "manaplus_")) - { - struct stat statbuf; - const std::string file = pathJoin( - fixPath, name); - if (stat(file.c_str(), &statbuf) == 0) - VirtFs::unmountZip(file); - } - } } void UpdaterWindow::addUpdateFile(const std::string &restrict path, @@ -900,8 +832,9 @@ void UpdaterWindow::logic() mCurrentFile = xmlUpdateFile; mValidateXml = true; mStoreInMemory = false; - mDownloadStatus = UpdateDownloadStatus::UPDATE_LIST2; - download(); + mDownloadStatus = UpdateDownloadStatus::UPDATE_COMPLETE; + //mDownloadStatus = UpdateDownloadStatus::UPDATE_LIST2; + //download(); } break; diff --git a/src/gui/windows/updaterwindow.h b/src/gui/windows/updaterwindow.h index ba836a658..daa80f978 100644 --- a/src/gui/windows/updaterwindow.h +++ b/src/gui/windows/updaterwindow.h @@ -130,10 +130,6 @@ class UpdaterWindow final : public Window, const std::string &restrict fixPath, const std::string &filerestrict); - static void loadManaPlusUpdates(const std::string &dir); - - static void unloadManaPlusUpdates(const std::string &dir); - static unsigned long getFileHash(const std::string &filePath); static void loadMods(const std::string &dir, |