From 08c07c4a0d5f0699a6a297dfc3cfff32e4ce92ee Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Fri, 15 Jul 2011 14:17:42 +0200 Subject: [PATCH] d->path, not path. error while merging. thank goodness for unit tests. --- package.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/package.cpp b/package.cpp index 70ce24094..b55509647 100644 --- a/package.cpp +++ b/package.cpp @@ -361,13 +361,18 @@ QStringList Package::entryList(const char *key) const QMap::const_iterator it = d->contents.constFind(key); if (it == d->contents.constEnd()) { + //kDebug() << "couldn't find" << key; return QStringList(); } + //kDebug() << "going to list" << key; QStringList list; foreach (const QString &prefix, d->contentsPrefixPaths) { + //kDebug() << " looking in" << prefix; foreach (const QString &path, it.value().paths) { + //kDebug() << " looking in" << path; if (it.value().directory) { + //kDebug() << "it's a directory, so trying out" << d->path + prefix + path; QDir dir(d->path + prefix + path); if (d->externalPaths) { @@ -376,12 +381,13 @@ QStringList Package::entryList(const char *key) const // ensure that we don't return files outside of our base path // due to symlink or ../ games QString canonicalized = dir.canonicalPath(); - if (canonicalized.startsWith(path)) { + if (canonicalized.startsWith(d->path)) { list += dir.entryList(QDir::Files | QDir::Readable); } } } else { const QString fullPath = d->path + prefix + path; + //kDebug() << "it's a file at" << fullPath << QFile::exists(fullPath); if (!QFile::exists(fullPath)) { continue; }