Skip to content
Snippets Groups Projects
Commit 78e54b9f authored by Steve Borho's avatar Steve Borho
Browse files

cmdutil: fall back to filename if glob expand has errors

On Windows, Mercurial tries to glob expand provided filenames as a
convenience to the user. Unfortunately, there are valid filenames
which are not valid glob patterns.  In those cases, we should fallback
to the original provided filename.
parent f439d82f
No related branches found
No related tags found
No related merge requests found
......@@ -242,7 +242,10 @@
for p in pats:
kind, name = _match._patsplit(p, None)
if kind is None:
globbed = glob.glob(name)
try:
globbed = glob.glob(name)
except re.error:
globbed = [name]
if globbed:
ret.extend(globbed)
continue
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment