Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Evan Edmond
fslpy
Commits
2306f558
Commit
2306f558
authored
Aug 20, 2021
by
Paul McCarthy
🚵
Browse files
RF: Expand wildcard patterns if they are passed to imglob, instead of being
expanded by the shell.
parent
af99f14e
Changes
1
Hide whitespace changes
Inline
Side-by-side
fsl/scripts/imglob.py
View file @
2306f558
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment