Skip to content

Commit

Permalink
Fix no extension in file wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
constantinpape committed Dec 2, 2023
1 parent 75fc848 commit d8e8dcf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions elf/io/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def open_file(path, mode="a", ext=None, **kwargs):
# We need to treat .nii.gz differently
if len(suffixes) == 2 and "".join(suffixes) == ".nii.gz":
ext = ".nii.gz"
elif len(suffixes) == 0:
ext = ""
else:
ext = suffixes[-1]

Expand Down

0 comments on commit d8e8dcf

Please sign in to comment.