diff options
Diffstat (limited to 'application/dialogs/ExportInstanceDialog.cpp')
-rw-r--r-- | application/dialogs/ExportInstanceDialog.cpp | 14 |
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" |