allow arbitrary in-package paths with empty filetypes

svn path=/trunk/KDE/kdelibs/; revision=1100981
This commit is contained in:
Aaron J. Seigo 2010-03-09 05:57:57 +00:00
parent 01b3fd2286
commit 5505c4a7b0

View File

@ -105,11 +105,15 @@ QString Package::filePath(const char *fileType, const QString &filename) const
return QString();
}
QString path = d->structure->path(fileType);
QString path;
if (path.isEmpty()) {
kDebug() << "no matching path came of it, while looking for" << fileType << filename;
return QString();
if (qstrlen(fileType) != 0) {
path = d->structure->path(fileType);
if (path.isEmpty()) {
kDebug() << "no matching path came of it, while looking for" << fileType << filename;
return QString();
}
}
path.prepend(d->structure->path() + d->structure->contentsPrefix());