[ros-rospack] 05/08: Limit search depth for /usr/share
Jochen Sprickerhof
jspricke at moszumanska.debian.org
Wed Jul 12 16:58:01 UTC 2017
This is an automated email from the git hooks/post-receive script.
jspricke pushed a commit to branch patch-queue/master
in repository ros-rospack.
commit c0ba2c09cd70f21752cc4e37866100692dc53776
Author: Jochen Sprickerhof <git at jochen.sprickerhof.de>
Date: Mon Feb 15 10:33:19 2016 +0100
Limit search depth for /usr/share
Gbp-Pq: Name 0004-Limit-search-depth-for-usr-share.patch
---
src/rospack.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/rospack.cpp b/src/rospack.cpp
index ce0420b..ece8b3f 100644
--- a/src/rospack.cpp
+++ b/src/rospack.cpp
@@ -30,6 +30,7 @@
#include "tinyxml2.h"
#include <boost/algorithm/string.hpp>
+#include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem.hpp>
#include <boost/functional/hash.hpp>
#include <stdexcept>
@@ -1527,7 +1528,7 @@ Rosstackage::crawlDetail(const std::string& path,
std::string name = dit->path().filename().string();
#endif
// Ignore directories starting with '.'
- if(name.size() == 0 || name[0] == '.')
+ if(name.size() == 0 || name[0] == '.' || (boost::starts_with(dit->path().string(), "/usr/share") && depth > 1))
continue;
crawlDetail(dit->path().string(), force, depth+1,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ros/ros-rospack.git
More information about the debian-science-commits
mailing list