mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +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 {
|
||||
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
|
||||
|
@ -1238,7 +1241,7 @@ QString KStandardDirs::saveLocation(const char *type,
|
|||
#endif
|
||||
return fullPath;
|
||||
}
|
||||
if(!makeDir(fullPath, 0700)) {
|
||||
if(!KStandardDirs::makeDir(fullPath, 0700)) {
|
||||
return fullPath;
|
||||
}
|
||||
d->m_dircache.remove(type);
|
||||
|
|
Loading…
Add table
Reference in a new issue