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 | |
| parent | 5f337a11124d21ddfcf63c277965c38a9f97e92d (diff) | |
| download | gentoolkit-efd5f95aeb46a041c86bcc0a23490bbeb9c9341b.tar.gz | |
Fix equery belongs to strip multiple slashes from path names. (Bug #234584)
svn path=/; revision=505
| -rw-r--r-- | trunk/ChangeLog | 4 | ||||
| -rwxr-xr-x | trunk/src/equery/equery | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/trunk/ChangeLog b/trunk/ChangeLog index 4ec5c13..17124b6 100644 --- a/trunk/ChangeLog +++ b/trunk/ChangeLog @@ -1,3 +1,7 @@ +2008-08-22: Paul Varner <fuzzyray@gentoo.org> + * equery: Fix equery belongs to strip multiple slashes from path + names. (Bug #234584) + 2008-07-24: Paul Varner <fuzzyray@gentoo.org> * equery: Fix equery check to convert mtime to an integer so that comparisions always work. Thanks to Alexey Parshin for discovering the 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) |
