diff options
| author | fuzzyray <fuzzyray@gentoo.org> | 2008-08-22 20:14:08 +0000 |
|---|---|---|
| committer | fuzzyray <fuzzyray@gentoo.org> | 2008-08-22 20:14:08 +0000 |
| commit | efd5f95aeb46a041c86bcc0a23490bbeb9c9341b (patch) | |
| tree | 1c6dc626cae335a03f8f44c1c497b27a2cd6e075 /trunk/src | |
| parent | 5f337a11124d21ddfcf63c277965c38a9f97e92d (diff) | |
| download | gentoolkit-efd5f95aeb46a041c86bcc0a23490bbeb9c9341b.tar.gz | |
Fix equery belongs to strip multiple slashes from path names. (Bug #234584)
svn path=/; revision=505
Diffstat (limited to 'trunk/src')
| -rwxr-xr-x | trunk/src/equery/equery | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/trunk/src/equery/equery b/trunk/src/equery/equery index ed8c5c4..63eb8b3 100755 --- a/trunk/src/equery/equery +++ b/trunk/src/equery/equery @@ -369,12 +369,13 @@ class CmdListBelongs(Command): if opts["fullRegex"]: q = query else: - # Trim trailing slash from query + # Trim trailing and multiple slashes from query for i in range(0, len(query)): - if (query[i][-1] == "/"): - query[i] = query[i][:-1] + query[i] = re.compile('/+').sub('/', query[i]) + query[i] = query[i].rstrip('/') q = map(lambda x: ((len(x) and x[0] == "/") and "^" or "/") + re.escape(x) + "$", query) + print q try: q = "|".join(q) rx = re.compile(q) |
