- return *i;
- else if(msp && !base.compare(0, dash-3, name, 3, string::npos))
- return *i;
+ return p;
+ else if(msp && !base.compare(0, dash, name, 3, string::npos))
+ return p;
+ }
+
+ return FS::Path();
+}
+
+FS::Path PackageManager::get_binary_package_file(const string &name)
+{
+ builder.get_logger().log("packagemgr", "Looking for binary package %s", name);
+
+ if(binpkg_files.empty())
+ {
+ for(const FS::Path &p: binpkg_path)
+ {
+ builder.get_logger().log("files", "Traversing %s", p);
+ vector<string> files = list_filtered(p, "\\.bpk$");
+ for(const string &f: files)
+ binpkg_files.push_back(p/f);
+ builder.get_logger().log("packagemgr", "%d binary packages found in %s", files.size(), p);
+ }
+
+ builder.get_logger().log("packagemgr", "%d binary packages found", binpkg_files.size());