From 0806bd7a9465e21e16f48ac9d63070bae4bd174a Mon Sep 17 00:00:00 2001
From: Dan Goodliffe <dan@randomdan.homeip.net>
Date: Mon, 30 May 2016 12:48:25 +0100
Subject: Ignore .ebuild files, lots of them and we don't use them

---
 gentoobrowse-api/service/maintenancePackageTree.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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),
-- 
cgit v1.2.3