aboutsummaryrefslogtreecommitdiff
path: root/api/logic/modplatform/technic
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@users.noreply.github.com>2020-11-14 16:14:50 +0100
committerGitHub <noreply@github.com>2020-11-14 16:14:50 +0100
commit66c09999014fd4337baa6ae03f019cb77917d6df (patch)
treef7939bfa85f06bb2e23392508648cd45b447b45c /api/logic/modplatform/technic
parenteb3e6e4c6ae29c9542d6c4b715644b7207c1ee93 (diff)
parentedfea9894ea3f6d4d244de5ba5ce015c1ccd7f39 (diff)
downloadPrismLauncher-66c09999014fd4337baa6ae03f019cb77917d6df.tar.gz
PrismLauncher-66c09999014fd4337baa6ae03f019cb77917d6df.tar.bz2
PrismLauncher-66c09999014fd4337baa6ae03f019cb77917d6df.zip
Merge pull request #3438 from jamierocks/technic-zip-fix
GH-3437 Extract Technic single zip packs to correct place
Diffstat (limited to 'api/logic/modplatform/technic')
-rw-r--r--api/logic/modplatform/technic/SingleZipPackInstallTask.cpp4
-rw-r--r--api/logic/modplatform/technic/SingleZipPackInstallTask.h6
-rw-r--r--api/logic/modplatform/technic/SolderPackInstallTask.cpp1
-rw-r--r--api/logic/modplatform/technic/SolderPackInstallTask.h2
-rw-r--r--api/logic/modplatform/technic/TechnicPackProcessor.cpp2
-rw-r--r--api/logic/modplatform/technic/TechnicPackProcessor.h2
6 files changed, 2 insertions, 15 deletions
diff --git a/api/logic/modplatform/technic/SingleZipPackInstallTask.cpp b/api/logic/modplatform/technic/SingleZipPackInstallTask.cpp
index 833ac0a2..7901db04 100644
--- a/api/logic/modplatform/technic/SingleZipPackInstallTask.cpp
+++ b/api/logic/modplatform/technic/SingleZipPackInstallTask.cpp
@@ -13,7 +13,6 @@
* limitations under the License.
*/
-
#include "SingleZipPackInstallTask.h"
#include "Env.h"
@@ -21,6 +20,7 @@
#include "TechnicPackProcessor.h"
#include <QtConcurrent>
+#include <FileSystem.h>
Technic::SingleZipPackInstallTask::SingleZipPackInstallTask(const QUrl &sourceUrl, const QString &minecraftVersion)
{
@@ -48,7 +48,7 @@ void Technic::SingleZipPackInstallTask::executeTask()
void Technic::SingleZipPackInstallTask::downloadSucceeded()
{
setStatus(tr("Extracting modpack"));
- QDir extractDir(m_stagingPath);
+ QDir extractDir(FS::PathCombine(m_stagingPath, ".minecraft"));
qDebug() << "Attempting to create instance from" << m_archivePath;
// open the zip and find relevant files in it
diff --git a/api/logic/modplatform/technic/SingleZipPackInstallTask.h b/api/logic/modplatform/technic/SingleZipPackInstallTask.h
index 929476bb..99534130 100644
--- a/api/logic/modplatform/technic/SingleZipPackInstallTask.h
+++ b/api/logic/modplatform/technic/SingleZipPackInstallTask.h
@@ -13,12 +13,8 @@
* limitations under the License.
*/
-
#pragma once
-#ifndef TECHNIC_SINGLEZIPPACKINSTALLTASK_H
-#define TECHNIC_SINGLEZIPPACKINSTALLTASK_H
-
#include "InstanceTask.h"
#include "net/NetJob.h"
#include "multimc_logic_export.h"
@@ -60,5 +56,3 @@ private:
};
} // namespace Technic
-
-#endif // TECHNIC_SINGLEZIPPACKINSTALLTASK_H
diff --git a/api/logic/modplatform/technic/SolderPackInstallTask.cpp b/api/logic/modplatform/technic/SolderPackInstallTask.cpp
index abdc0c0c..54ae6dff 100644
--- a/api/logic/modplatform/technic/SolderPackInstallTask.cpp
+++ b/api/logic/modplatform/technic/SolderPackInstallTask.cpp
@@ -13,7 +13,6 @@
* limitations under the License.
*/
-
#include "SolderPackInstallTask.h"
#include <FileSystem.h>
diff --git a/api/logic/modplatform/technic/SolderPackInstallTask.h b/api/logic/modplatform/technic/SolderPackInstallTask.h
index d3a1d0fd..c3e3f6d9 100644
--- a/api/logic/modplatform/technic/SolderPackInstallTask.h
+++ b/api/logic/modplatform/technic/SolderPackInstallTask.h
@@ -13,7 +13,6 @@
* limitations under the License.
*/
-
#pragma once
#include <InstanceTask.h>
@@ -22,7 +21,6 @@
#include <QUrl>
-
namespace Technic
{
class MULTIMC_LOGIC_EXPORT SolderPackInstallTask : public InstanceTask
diff --git a/api/logic/modplatform/technic/TechnicPackProcessor.cpp b/api/logic/modplatform/technic/TechnicPackProcessor.cpp
index f986a529..4a8191eb 100644
--- a/api/logic/modplatform/technic/TechnicPackProcessor.cpp
+++ b/api/logic/modplatform/technic/TechnicPackProcessor.cpp
@@ -13,7 +13,6 @@
* limitations under the License.
*/
-
#include "TechnicPackProcessor.h"
#include <FileSystem.h>
@@ -27,7 +26,6 @@
#include <memory>
-
void Technic::TechnicPackProcessor::run(SettingsObjectPtr globalSettings, const QString &instName, const QString &instIcon, const QString &stagingPath, const QString &minecraftVersion, const bool isSolder)
{
QString minecraftPath = FS::PathCombine(stagingPath, ".minecraft");
diff --git a/api/logic/modplatform/technic/TechnicPackProcessor.h b/api/logic/modplatform/technic/TechnicPackProcessor.h
index 49d046a5..f0edb17a 100644
--- a/api/logic/modplatform/technic/TechnicPackProcessor.h
+++ b/api/logic/modplatform/technic/TechnicPackProcessor.h
@@ -13,13 +13,11 @@
* limitations under the License.
*/
-
#pragma once
#include <QString>
#include "settings/SettingsObject.h"
-
namespace Technic
{
// not exporting it, only used in SingleZipPackInstallTask, InstanceImportTask and SolderPackInstallTask