diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-01-05 19:54:05 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-01-05 19:54:05 +0100 |
commit | becaebd60d3c268dd9f95561afbe74bb8cd5f1e1 (patch) | |
tree | c6ef7d116e307d8d2030408492fa42b37de0f788 /logic/updater | |
parent | 9417544ca6c570273f891af3587aab4eb15f1ddf (diff) | |
download | MultiMC-becaebd60d3c268dd9f95561afbe74bb8cd5f1e1.tar MultiMC-becaebd60d3c268dd9f95561afbe74bb8cd5f1e1.tar.gz MultiMC-becaebd60d3c268dd9f95561afbe74bb8cd5f1e1.tar.lz MultiMC-becaebd60d3c268dd9f95561afbe74bb8cd5f1e1.tar.xz MultiMC-becaebd60d3c268dd9f95561afbe74bb8cd5f1e1.zip |
Remove the $PWD hack and tests that depended on it.
Diffstat (limited to 'logic/updater')
-rw-r--r-- | logic/updater/DownloadUpdateTask.cpp | 18 | ||||
-rw-r--r-- | logic/updater/DownloadUpdateTask.h | 6 |
2 files changed, 4 insertions, 20 deletions
diff --git a/logic/updater/DownloadUpdateTask.cpp b/logic/updater/DownloadUpdateTask.cpp index e16d2aa2..83679f19 100644 --- a/logic/updater/DownloadUpdateTask.cpp +++ b/logic/updater/DownloadUpdateTask.cpp @@ -60,13 +60,14 @@ void DownloadUpdateTask::processChannels() QList<UpdateChecker::ChannelListEntry> channels = checker->getChannelList(); QString channelId = MMC->version().channel; + m_cRepoUrl.clear(); // Search through the channel list for a channel with the correct ID. for (auto channel : channels) { if (channel.id == channelId) { QLOG_INFO() << "Found matching channel."; - m_cRepoUrl = fixPathForTests(channel.url); + m_cRepoUrl = channel.url; break; } } @@ -229,12 +230,12 @@ bool DownloadUpdateTask::parseVersionInfo(const QByteArray &data, VersionFileLis if (type == "http") { file.sources.append( - FileSource("http", fixPathForTests(sourceObj.value("Url").toString()))); + FileSource("http", sourceObj.value("Url").toString())); } else if (type == "httpc") { file.sources.append( - FileSource("httpc", fixPathForTests(sourceObj.value("Url").toString()), + FileSource("httpc", sourceObj.value("Url").toString(), sourceObj.value("CompressionType").toString())); } else @@ -504,17 +505,6 @@ bool DownloadUpdateTask::writeInstallScript(UpdateOperationList &opsList, QStrin return true; } -QString DownloadUpdateTask::fixPathForTests(const QString &path) -{ - if (path.startsWith("$PWD")) - { - QString foo = path; - foo.replace("$PWD", qApp->applicationDirPath()); - return QUrl::fromLocalFile(foo).toString(QUrl::FullyEncoded); - } - return path; -} - bool DownloadUpdateTask::fixPathForOSX(QString &path) { if (path.startsWith("MultiMC.app/")) diff --git a/logic/updater/DownloadUpdateTask.h b/logic/updater/DownloadUpdateTask.h index 4feab871..518bc235 100644 --- a/logic/updater/DownloadUpdateTask.h +++ b/logic/updater/DownloadUpdateTask.h @@ -196,12 +196,6 @@ protected: /*! * Filters paths - * Path of the format $PWD/path, it is converted to a file:///$PWD/ URL - */ - static QString fixPathForTests(const QString &path); - - /*! - * Filters paths * This fixes destination paths for OSX. * The updater runs in MultiMC.app/Contents/MacOs by default * The destination paths are such as this: MultiMC.app/blah/blah |