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
FSL
fslpy
Commits
11951148
Commit
11951148
authored
Aug 15, 2018
by
Martin Craig
Browse files
Handle conflicts in output where two outputs have the same name (without file extension)
parent
68494421
Changes
1
Hide whitespace changes
Inline
Side-by-side
fsl/wrappers/wrapperutils.py
View file @
11951148
...
...
@@ -858,7 +858,6 @@ class _FileOrThing(object):
for
prefixed
in
it
.
chain
(
*
allPrefixed
):
fullpath
=
prefixed
prefixed
=
op
.
relpath
(
prefixed
,
workdir
)
for
prefPat
,
prefName
in
prefixes
.
items
():
if
not
fnmatch
.
fnmatch
(
prefixed
,
'{}*'
.
format
(
prefPat
)):
continue
...
...
@@ -871,9 +870,13 @@ class _FileOrThing(object):
# not of the correct type.
fval
=
self
.
__load
(
fullpath
)
if
fval
is
not
None
:
prefixed
=
self
.
__removeExt
(
prefixed
)
prefixed
=
re
.
sub
(
'^'
+
prefPat
,
prefName
,
prefixed
)
result
[
prefixed
]
=
fval
noext
=
self
.
__removeExt
(
prefixed
)
noext
=
re
.
sub
(
'^'
+
prefPat
,
prefName
,
noext
)
if
noext
not
in
result
:
result
[
noext
]
=
fval
else
:
withext
=
re
.
sub
(
'^'
+
prefPat
,
prefName
,
prefixed
)
result
[
withext
]
=
fval
break
return
result
...
...
Write
Preview
Supports
Markdown
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