mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-14 02:06:48 +02:00
Merge pull request #13909 from NissimHadar/fixFileUtils
Create correct folder.
This commit is contained in:
commit
476887a224
1 changed files with 5 additions and 3 deletions
|
@ -156,10 +156,12 @@ bool FileUtils::canCreateFile(const QString& fullPath) {
|
|||
qDebug(shared) << "unable to overwrite file '" << fullPath << "'";
|
||||
return false;
|
||||
}
|
||||
QDir dir(fileInfo.absolutePath());
|
||||
|
||||
QString absolutePath = fileInfo.absolutePath();
|
||||
QDir dir(absolutePath);
|
||||
if (!dir.exists()) {
|
||||
if (!dir.mkpath(fullPath)) {
|
||||
qDebug(shared) << "unable to create dir '" << dir.absolutePath() << "'";
|
||||
if (!dir.mkpath(absolutePath)) {
|
||||
qDebug(shared) << "unable to create dir '" << absolutePath << "'";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue