aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/ResourceFolderModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/minecraft/mod/ResourceFolderModel.cpp')
-rw-r--r--launcher/minecraft/mod/ResourceFolderModel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/launcher/minecraft/mod/ResourceFolderModel.cpp b/launcher/minecraft/mod/ResourceFolderModel.cpp
index fdfb434b..b8353133 100644
--- a/launcher/minecraft/mod/ResourceFolderModel.cpp
+++ b/launcher/minecraft/mod/ResourceFolderModel.cpp
@@ -12,9 +12,11 @@
#include "tasks/Task.h"
-ResourceFolderModel::ResourceFolderModel(QDir dir, QObject* parent) : QAbstractListModel(parent), m_dir(dir), m_watcher(this)
+ResourceFolderModel::ResourceFolderModel(QDir dir, bool create_dir, QObject* parent) : QAbstractListModel(parent), m_dir(dir), m_watcher(this)
{
- FS::ensureFolderPathExists(m_dir.absolutePath());
+ if (create_dir) {
+ FS::ensureFolderPathExists(m_dir.absolutePath());
+ }
m_dir.setFilter(QDir::Readable | QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs);
m_dir.setSorting(QDir::Name | QDir::IgnoreCase | QDir::LocaleAware);