various: consolidated dir exists+mkpath into one function

This commit is contained in:
itsmattkc
2022-04-07 17:11:50 -07:00
parent 20f74919a3
commit 48adb159b8
8 changed files with 14 additions and 30 deletions
+1 -1
View File
@@ -313,7 +313,7 @@ void ExportDialog::StartExport()
// If the directory does not exist, try to create it
QDir dest_dir(file_info.path());
if (!dest_dir.exists() && !dest_dir.mkpath(QStringLiteral("."))) {
if (!FileFunctions::DirectoryIsValid(dest_dir)) {
QtUtils::MessageBox(this, QMessageBox::Critical, tr("Failed to create output directory"),
tr("The intended output directory doesn't exist and Olive couldn't create it. "
"Please choose a different filename."));