diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-01-28 12:37:22 +0100 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-01-31 21:40:59 +0100 |
commit | a8089b76c0e7961e31b96cdd203e3c345183645b (patch) | |
tree | 973a74a6d2cfe0222e1dddcdbf6c706e7794d0e0 /launcher/ui | |
parent | 71516e6c728a6b7429c04f297f6b0f3710bfa3c3 (diff) | |
download | PrismLauncher-a8089b76c0e7961e31b96cdd203e3c345183645b.tar.gz PrismLauncher-a8089b76c0e7961e31b96cdd203e3c345183645b.tar.bz2 PrismLauncher-a8089b76c0e7961e31b96cdd203e3c345183645b.zip |
fix: bring back instance exports
Diffstat (limited to 'launcher/ui')
-rw-r--r-- | launcher/ui/dialogs/ExportInstanceDialog.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/launcher/ui/dialogs/ExportInstanceDialog.cpp b/launcher/ui/dialogs/ExportInstanceDialog.cpp index fb9c6542..f3bf7abe 100644 --- a/launcher/ui/dialogs/ExportInstanceDialog.cpp +++ b/launcher/ui/dialogs/ExportInstanceDialog.cpp @@ -403,10 +403,13 @@ bool ExportInstanceDialog::doExport() auto & blocked = proxyModel->blockedPaths(); using std::placeholders::_1; - QMessageBox::warning(this, tr("Error"), tr("Unable to export instance")); - return false; - // TODO Reimplement custom compressDir: - if (!JlCompress::compressDir(output, m_instance->instanceRoot(), name, std::bind(&SeparatorPrefixTree<'/'>::covers, blocked, _1))) + auto files = QFileInfoList(); + if (!MMCZip::collectFileListRecursively(m_instance->instanceRoot(), nullptr, &files, + std::bind(&SeparatorPrefixTree<'/'>::covers, blocked, _1))) { + QMessageBox::warning(this, tr("Error"), tr("Unable to export instance")); + return false; + } + if (!MMCZip::compressDirFiles(output, m_instance->instanceRoot(), files)) { QMessageBox::warning(this, tr("Error"), tr("Unable to export instance")); return false; |