diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-05-30 12:48:25 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-05-30 12:48:25 +0100 |
commit | 0806bd7a9465e21e16f48ac9d63070bae4bd174a (patch) | |
tree | 7463ef7ef135474f93496cb0a5a975a668105dbb | |
parent | gbdbupdate does bugs too and background option (diff) | |
download | gentoobrowse-api-0806bd7a9465e21e16f48ac9d63070bae4bd174a.tar.bz2 gentoobrowse-api-0806bd7a9465e21e16f48ac9d63070bae4bd174a.tar.xz gentoobrowse-api-0806bd7a9465e21e16f48ac9d63070bae4bd174a.zip |
Ignore .ebuild files, lots of them and we don't use themgentoobrowse-api-0.4.2
-rw-r--r-- | gentoobrowse-api/service/maintenancePackageTree.cpp | 4 |
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), |