Skip to content

Commit a77edf9

Browse files
committed
Merge pull request nipy#437 from nipy/bug/DirectoryDataSinkSource
BUG: Process Directories as data sinks
2 parents bb28c5e + c4cf9c5 commit a77edf9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

nipype/interfaces/io.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@ def __init__(self, infields=None, **kwargs):
221221
self.inputs.trait_set(trait_change_notify=False, **undefined_traits)
222222

223223
def _get_dst(self, src):
224+
## If path is directory with trailing os.path.sep,
225+
## then remove that for a more robust behavior
226+
src = src.rstrip(os.path.sep)
224227
path, fname = os.path.split(src)
225228
if self.inputs.parameterization:
226229
dst = path

0 commit comments

Comments
 (0)