diff --git a/doomsday/sdk/libcore/src/filesys/fileindex.cpp b/doomsday/sdk/libcore/src/filesys/fileindex.cpp index b7b19279ee..3180e04815 100644 --- a/doomsday/sdk/libcore/src/filesys/fileindex.cpp +++ b/doomsday/sdk/libcore/src/filesys/fileindex.cpp @@ -171,13 +171,17 @@ void FileIndex::findPartialPath(Folder const &rootFolder, String const &path, void FileIndex::findPartialPath(String const &packageId, String const &path, FoundFiles &found) const { - findPartialPath(App::packageLoader().package(packageId).root(), - path, found, FindInEntireIndex); + // We can only look in Folder-like packages. + Package const &pkg = App::packageLoader().package(packageId); + if(pkg.file().is()) + { + findPartialPath(pkg.root(), path, found, FindInEntireIndex); - // Remove any matches not in the given package. - found.remove_if([&packageId] (File *file) { - return Package::identifierForContainerOfFile(*file) != packageId; - }); + // Remove any matches not in the given package. + found.remove_if([&packageId](File *file) { + return Package::identifierForContainerOfFile(*file) != packageId; + }); + } } int FileIndex::findPartialPathInPackageOrder(String const &path, FoundFiles &found, Behavior behavior) const