From 32b3ed0a1362a4b0798ad71fac3450fb77cb7e41 Mon Sep 17 00:00:00 2001 From: Thomas Groman Date: Thu, 19 Sep 2019 00:41:48 -0700 Subject: merged from 0.6.7 codebase --- api/logic/BaseInstaller.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'api/logic/BaseInstaller.cpp') diff --git a/api/logic/BaseInstaller.cpp b/api/logic/BaseInstaller.cpp index 51f66293..3819a4e4 100644 --- a/api/logic/BaseInstaller.cpp +++ b/api/logic/BaseInstaller.cpp @@ -1,4 +1,4 @@ -/* Copyright 2013-2018 MultiMC Contributors +/* Copyright 2013-2019 MultiMC Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,37 +25,37 @@ BaseInstaller::BaseInstaller() bool BaseInstaller::isApplied(MinecraftInstance *on) { - return QFile::exists(filename(on->instanceRoot())); + return QFile::exists(filename(on->instanceRoot())); } bool BaseInstaller::add(MinecraftInstance *to) { - if (!patchesDir(to->instanceRoot()).exists()) - { - QDir(to->instanceRoot()).mkdir("patches"); - } - - if (isApplied(to)) - { - if (!remove(to)) - { - return false; - } - } - - return true; + if (!patchesDir(to->instanceRoot()).exists()) + { + QDir(to->instanceRoot()).mkdir("patches"); + } + + if (isApplied(to)) + { + if (!remove(to)) + { + return false; + } + } + + return true; } bool BaseInstaller::remove(MinecraftInstance *from) { - return QFile::remove(filename(from->instanceRoot())); + return QFile::remove(filename(from->instanceRoot())); } QString BaseInstaller::filename(const QString &root) const { - return patchesDir(root).absoluteFilePath(id() + ".json"); + return patchesDir(root).absoluteFilePath(id() + ".json"); } QDir BaseInstaller::patchesDir(const QString &root) const { - return QDir(root + "/patches/"); + return QDir(root + "/patches/"); } -- cgit v1.2.3