mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
kdecore: create the last directory of the special resource if it does not exist
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
3ab0e01817
commit
5275fdc8a4
1 changed files with 5 additions and 2 deletions
|
@ -868,7 +868,10 @@ void KStandardDirs::KStandardDirsPrivate::createSpecialResource(const char *type
|
||||||
} else {
|
} else {
|
||||||
Q_ASSERT(false);
|
Q_ASSERT(false);
|
||||||
}
|
}
|
||||||
q->addResourceDir(type, QDir::cleanPath(resourceDir) + QLatin1Char('/'), false);
|
// NOTE: QStandardPaths::writableLocation() should create the base directory
|
||||||
|
const QString cleanPath = QDir::cleanPath(resourceDir) + QLatin1Char('/');
|
||||||
|
KStandardDirs::makeDir(cleanPath, 0700);
|
||||||
|
q->addResourceDir(type, cleanPath, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList KStandardDirs::resourceDirs(const char *type) const
|
QStringList KStandardDirs::resourceDirs(const char *type) const
|
||||||
|
@ -1238,7 +1241,7 @@ QString KStandardDirs::saveLocation(const char *type,
|
||||||
#endif
|
#endif
|
||||||
return fullPath;
|
return fullPath;
|
||||||
}
|
}
|
||||||
if(!makeDir(fullPath, 0700)) {
|
if(!KStandardDirs::makeDir(fullPath, 0700)) {
|
||||||
return fullPath;
|
return fullPath;
|
||||||
}
|
}
|
||||||
d->m_dircache.remove(type);
|
d->m_dircache.remove(type);
|
||||||
|
|
Loading…
Add table
Reference in a new issue