mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-01 04:33:39 +02:00
storagehelper: include filesystem
Change-Id: I1db1553cc1f9078b8e33e99cadb7a8d842bf024c
This commit is contained in:
parent
9a123fcad1
commit
e481bb4eb0
1 changed files with 7 additions and 0 deletions
|
@ -38,6 +38,9 @@
|
|||
#include <QJsonDocument>
|
||||
|
||||
#include <fstream>
|
||||
#if !defined(Q_OS_LINUX) || __GNUC__ > 8
|
||||
#include <filesystem>
|
||||
#endif
|
||||
#include <thread>
|
||||
#include <cstring>
|
||||
|
||||
|
@ -292,9 +295,13 @@ setProfile(const QString& accountId, const api::profile::Info& profileInfo, cons
|
|||
QFileInfo fileInfo(path);
|
||||
auto dir = fileInfo.dir();
|
||||
if (!dir.exists()) {
|
||||
#if !defined(Q_OS_LINUX) || __GNUC__ > 8
|
||||
if (!std::filesystem::create_directory(dir.path().toStdString())) {
|
||||
#endif
|
||||
qWarning() << "Cannot create " << dir.path();
|
||||
#if !defined(Q_OS_LINUX) || __GNUC__ > 8
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (!lf.lock()) {
|
||||
qWarning().noquote() << "Can't lock file for writing: " << file.fileName();
|
||||
|
|
Loading…
Add table
Reference in a new issue