Skip to content
Snippets Groups Projects
Unverified Commit 69002fb3 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

storagehelper: replace Qt's bugguy method by std

mkdir(".") seems to fail in /tmp but the std wins.

Change-Id: Ic6948255bc57c489d976bcbc3666958f96a7fca5
parent 3640456e
No related branches found
No related tags found
No related merge requests found
...@@ -292,7 +292,9 @@ setProfile(const QString& accountId, const api::profile::Info& profileInfo, cons ...@@ -292,7 +292,9 @@ setProfile(const QString& accountId, const api::profile::Info& profileInfo, cons
QFileInfo fileInfo(path); QFileInfo fileInfo(path);
auto dir = fileInfo.dir(); auto dir = fileInfo.dir();
if (!dir.exists()) { if (!dir.exists()) {
dir.mkdir("."); if (!std::filesystem::create_directory(dir.path().toStdString())) {
qWarning() << "Cannot create " << dir.path().toStdString();
}
} }
if (!lf.lock()) { if (!lf.lock()) {
qWarning().noquote() << "Can't lock file for writing: " << file.fileName(); qWarning().noquote() << "Can't lock file for writing: " << file.fileName();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment