Skip to content

Commit 1302437

Browse files
author
HuiQian Tan
committed
added escape for metacharacters
1 parent f756b71 commit 1302437

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nipype/interfaces/dcm2nii.py

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import re
55
from copy import deepcopy
66
import itertools as it
7+
import glob
78
from glob import iglob
89

910
from ..utils.filemanip import split_filename
@@ -451,6 +452,7 @@ def _parse_stdout(self, stdout):
451452
for line in stdout.split("\n"):
452453
if line.startswith("Convert "): # output
453454
fname = str(re.search(r"\S+/\S+", line).group(0))
455+
fname = glob.escape(fname)
454456
filenames.append(os.path.abspath(fname))
455457
return filenames
456458

0 commit comments

Comments
 (0)