summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-06-03 21:10:28 +0200
committerPetr Mrázek <peterix@gmail.com>2015-06-06 21:23:05 +0200
commit06a67fbd3852cdaa9bb4d8e2900543b47360f0fc (patch)
treec0f5e05661c1c31ae9815a8543157d45167100e3 /application
parent3a8b238052163952831fb5924b2483a375e86ebd (diff)
downloadMultiMC-06a67fbd3852cdaa9bb4d8e2900543b47360f0fc.tar
MultiMC-06a67fbd3852cdaa9bb4d8e2900543b47360f0fc.tar.gz
MultiMC-06a67fbd3852cdaa9bb4d8e2900543b47360f0fc.tar.lz
MultiMC-06a67fbd3852cdaa9bb4d8e2900543b47360f0fc.tar.xz
MultiMC-06a67fbd3852cdaa9bb4d8e2900543b47360f0fc.zip
NOISSUE use FS a bit more
Diffstat (limited to 'application')
-rw-r--r--application/dialogs/ExportInstanceDialog.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/application/dialogs/ExportInstanceDialog.cpp b/application/dialogs/ExportInstanceDialog.cpp
index ec376b1d..ec46b6ba 100644
--- a/application/dialogs/ExportInstanceDialog.cpp
+++ b/application/dialogs/ExportInstanceDialog.cpp
@@ -30,6 +30,7 @@
#include "SeparatorPrefixTree.h"
#include "Env.h"
#include <icons/IconList.h>
+#include <FileSystem.h>
class PackIgnoreProxy : public QSortFilterProxyModel
{
@@ -469,15 +470,16 @@ void ExportInstanceDialog::loadPackIgnore()
void ExportInstanceDialog::savePackIgnore()
{
+ auto data = proxyModel->blockedPaths().toStringList().join('\n').toUtf8();
auto filename = ignoreFileName();
- QSaveFile ignoreFile(filename);
- if(!ignoreFile.open(QIODevice::WriteOnly))
+ try
{
- ignoreFile.cancelWriting();
+ FS::write(filename, data);
+ }
+ catch (Exception & e)
+ {
+ qWarning() << e.cause();
}
- auto data = proxyModel->blockedPaths().toStringList().join('\n').toUtf8();
- ignoreFile.write(data);
- ignoreFile.commit();
}
#include "ExportInstanceDialog.moc"