diff --git a/quicksettings/record/recordutil.cpp b/quicksettings/record/recordutil.cpp index e1a9e491..e8a1cb08 100644 --- a/quicksettings/record/recordutil.cpp +++ b/quicksettings/record/recordutil.cpp @@ -6,12 +6,15 @@ #include "recordutil.h" +#include #include #include #include #include +using namespace Qt::StringLiterals; + RecordUtil::RecordUtil(QObject *parent) : QObject{parent} { @@ -19,7 +22,10 @@ RecordUtil::RecordUtil(QObject *parent) QString RecordUtil::videoLocation(const QString &name) { - QString path = QStandardPaths::writableLocation(QStandardPaths::MoviesLocation); + const QString path = QStandardPaths::writableLocation(QStandardPaths::MoviesLocation); + if (!QDir(path).mkpath(u"."_s)) { + qWarning() << "Unable to create directory" << path; + } QString newPath(path + '/' + name); if (QFile::exists(newPath)) { newPath = path + '/' + KFileUtils::suggestName(QUrl::fromLocalFile(newPath), name);