summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-05-30 12:48:25 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2016-05-30 12:48:25 +0100
commitd1cc79f8778839718f99c1140c2683df506e2b08 (patch)
tree7463ef7ef135474f93496cb0a5a975a668105dbb
parentgbdbupdate does bugs too and background option (diff)
downloadgentoobrowse-api-d1cc79f8778839718f99c1140c2683df506e2b08.tar.bz2
gentoobrowse-api-d1cc79f8778839718f99c1140c2683df506e2b08.tar.xz
gentoobrowse-api-d1cc79f8778839718f99c1140c2683df506e2b08.zip
Ignore .ebuild files, lots of them and we don't use them
-rw-r--r--gentoobrowse-api/service/maintenancePackageTree.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/gentoobrowse-api/service/maintenancePackageTree.cpp b/gentoobrowse-api/service/maintenancePackageTree.cpp
index b7a052e..5e3d4f4 100644
--- a/gentoobrowse-api/service/maintenancePackageTree.cpp
+++ b/gentoobrowse-api/service/maintenancePackageTree.cpp
@@ -5,6 +5,7 @@
#include <buffer.h>
#include <scopeExit.h>
#include <boost/filesystem/operations.hpp>
+#include <boost/algorithm/string/predicate.hpp>
#include <sql/maintenance/fileListCreateRaw.sql.h>
#include <sql/maintenance/fileListCreate.sql.h>
#include <sql/maintenance/fileListCreatePk.sql.h>
@@ -141,7 +142,8 @@ namespace Gentoo {
char buf[BUFSIZ];
for (boost::filesystem::recursive_directory_iterator d(tmp, boost::filesystem::symlink_option::recurse);
d != boost::filesystem::recursive_directory_iterator(); d++) {
- if (boost::filesystem::is_regular_file(d->status())) {
+ if (boost::filesystem::is_regular_file(d->status()) &&
+ !boost::algorithm::ends_with(d->path().string(), ".ebuild")) {
auto len = snprintf(buf, BUFSIZ, "%s\t%ld\t%s\n",
d->path().lexically_relative(tmp).c_str(),
boost::filesystem::file_size(*d),