From 69002fb32a4fbed22c662556c0ad955abaa1129f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= Date: Fri, 15 Jul 2022 12:05:53 -0400 Subject: [PATCH] storagehelper: replace Qt's bugguy method by std mkdir(".") seems to fail in /tmp but the std wins. Change-Id: Ic6948255bc57c489d976bcbc3666958f96a7fca5 --- src/libclient/authority/storagehelper.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libclient/authority/storagehelper.cpp b/src/libclient/authority/storagehelper.cpp index dc3b440c..fd28d0ee 100644 --- a/src/libclient/authority/storagehelper.cpp +++ b/src/libclient/authority/storagehelper.cpp @@ -292,7 +292,9 @@ setProfile(const QString& accountId, const api::profile::Info& profileInfo, cons QFileInfo fileInfo(path); auto dir = fileInfo.dir(); if (!dir.exists()) { - dir.mkdir("."); + if (!std::filesystem::create_directory(dir.path().toStdString())) { + qWarning() << "Cannot create " << dir.path().toStdString(); + } } if (!lf.lock()) { qWarning().noquote() << "Can't lock file for writing: " << file.fileName();