Skip to content
Snippets Groups Projects
Commit 2306f558 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

RF: Expand wildcard patterns if they are passed to imglob, instead of being

expanded by the shell.
parent af99f14e
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,19 @@ def imglob(paths, output=None):
imgfiles = []
# Expand any wildcard paths if provided.
# Depending on the way that imglob is
# invoked, this may not get done by the
# calling shell.
expanded = []
for path in paths:
if any(c in path for c in '*?[]'):
expanded.extend(glob.glob(path))
else:
expanded.append(path)
paths = expanded
# Build a list of all image files (both
# hdr and img and otherwise) that match
for path in paths:
......
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