1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-22 12:39:59 +00:00

Use std::filesystem::create_directories instead of std::filesystem::create_directory to recursively generate directories from the provided path.

This commit is contained in:
Project579 2022-09-10 02:31:22 +02:00
parent ca14fc00dc
commit 1a79f098fa

View File

@ -159,7 +159,7 @@ Launcher::FirstRunDialogResult Launcher::MainDialog::showFirstRunDialog()
// Dialog wizard and setup will fail if the config directory does not already exist // Dialog wizard and setup will fail if the config directory does not already exist
const auto& userConfigDir = mCfgMgr.getUserConfigPath(); const auto& userConfigDir = mCfgMgr.getUserConfigPath();
if ( ! exists(userConfigDir) ) { if ( ! exists(userConfigDir) ) {
if ( ! create_directory(userConfigDir) ) if ( ! create_directories(userConfigDir) )
{ {
cfgError(tr("Error opening OpenMW configuration file"), cfgError(tr("Error opening OpenMW configuration file"),
tr("<br><b>Could not create directory %0</b><br><br> \ tr("<br><b>Could not create directory %0</b><br><br> \
@ -484,7 +484,7 @@ bool Launcher::MainDialog::writeSettings()
const auto& userPath = mCfgMgr.getUserConfigPath(); const auto& userPath = mCfgMgr.getUserConfigPath();
if (!exists(userPath)) { if (!exists(userPath)) {
if (!create_directory(userPath)) { if (!create_directories(userPath)) {
cfgError(tr("Error creating OpenMW configuration directory"), cfgError(tr("Error creating OpenMW configuration directory"),
tr("<br><b>Could not create %0</b><br><br> \ tr("<br><b>Could not create %0</b><br><br> \
Please make sure you have the right permissions \ Please make sure you have the right permissions \