From 44db72ead568fe7ce22e1999aac02fd9aac9beea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 10 Oct 2015 05:55:55 +0200 Subject: GH-93 add an option to not copy saves on instance copy --- logic/minecraft/Mod.cpp | 2 +- logic/minecraft/ModList.cpp | 2 +- logic/minecraft/World.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'logic/minecraft') diff --git a/logic/minecraft/Mod.cpp b/logic/minecraft/Mod.cpp index 879ca195..9b9f76f9 100644 --- a/logic/minecraft/Mod.cpp +++ b/logic/minecraft/Mod.cpp @@ -278,7 +278,7 @@ bool Mod::replace(Mod &with) } if (t == MOD_FOLDER) { - success = FS::copyPath(with.m_file.filePath(), m_file.path()); + success = FS::copy(with.m_file.filePath(), m_file.path())(); } if (success) { diff --git a/logic/minecraft/ModList.cpp b/logic/minecraft/ModList.cpp index 60f8b012..07affb72 100644 --- a/logic/minecraft/ModList.cpp +++ b/logic/minecraft/ModList.cpp @@ -286,7 +286,7 @@ bool ModList::installMod(const QFileInfo &filename, int index) QString from = filename.filePath(); QString to = FS::PathCombine(m_dir.path(), filename.fileName()); - if (!FS::copyPath(from, to)) + if (!FS::copy(from, to)()) return false; m.repath(to); beginInsertRows(QModelIndex(), index, index); diff --git a/logic/minecraft/World.cpp b/logic/minecraft/World.cpp index e4734556..6081a8ec 100644 --- a/logic/minecraft/World.cpp +++ b/logic/minecraft/World.cpp @@ -197,7 +197,7 @@ bool World::install(const QString &to, const QString &name) else if(m_containerFile.isDir()) { QString from = m_containerFile.filePath(); - ok = FS::copyPath(from, finalPath); + ok = FS::copy(from, finalPath)(); } if(ok && !name.isEmpty() && m_actualName != name) @@ -350,7 +350,7 @@ bool World::replace(World &with) { if (!destroy()) return false; - bool success = FS::copyPath(with.m_containerFile.filePath(), m_containerFile.path()); + bool success = FS::copy(with.m_containerFile.filePath(), m_containerFile.path())(); if (success) { m_folderName = with.m_folderName; -- cgit v1.2.3