[ros-rospack] 05/07: Limit search depth for /usr/share
Jochen Sprickerhof
jspricke-guest at moszumanska.debian.org
Tue Jul 26 16:31:20 UTC 2016
This is an automated email from the git hooks/post-receive script.
jspricke-guest pushed a commit to branch patch-queue/master
in repository ros-rospack.
commit 0efc83a8fc3bb4546055b1543bed680c00610487
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 25ad345..0662cba 100644
--- a/src/rospack.cpp
+++ b/src/rospack.cpp
@@ -30,6 +30,7 @@
#include "tinyxml.h"
#include <boost/algorithm/string.hpp>
+#include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem.hpp>
#include <boost/functional/hash.hpp>
#include <stdexcept>
@@ -1517,7 +1518,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