From 7cfa2e41a4ad0b437169c6cff4c460195bd9cc32 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Wed, 27 Apr 2022 15:09:34 -0400 Subject: [PATCH] Create the data directory if it doesn't exist Apparently Qt does not do this automatically on Windows, so this fixes another out of box bug on that platform. --- src/assetupdater.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/assetupdater.cpp b/src/assetupdater.cpp index 5f5613f..75ed251 100644 --- a/src/assetupdater.cpp +++ b/src/assetupdater.cpp @@ -42,6 +42,9 @@ AssetUpdater::AssetUpdater(LauncherCore& launcher) : launcher(launcher) { dataDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); + + if(!QDir().exists(dataDir)) + QDir().mkdir(dataDir); } void AssetUpdater::update(const ProfileSettings& profile) {