We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4553031 commit 3df8489Copy full SHA for 3df8489
nipype/utils/filemanip.py
@@ -61,10 +61,8 @@ def split_filename(fname):
61
62
special_extensions = [".nii.gz", ".tar.gz"]
63
64
- if fname and fname.endswith(os.path.sep):
65
- fname = fname[:-1]
66
-
67
- pth, fname = os.path.split(fname)
+ pth = os.path.dirname(fname)
+ fname = os.path.basename(fname)
68
69
ext = None
70
for special_ext in special_extensions:
0 commit comments