+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
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)