Skip to content

Commit

Permalink
update get_io to check for suffix rather than existence of file
Browse files Browse the repository at this point in the history
  • Loading branch information
zm711 authored Jun 19, 2023
1 parent f608309 commit f77a411
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neo/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def list_candidate_ios(file_or_folder, ignore_patterns=['*.ini', 'README.txt', '
"""
file_or_folder = pathlib.Path(file_or_folder)

if file_or_folder.is_file():
if file_or_folder.suffix:
suffix = file_or_folder.suffix[1:].lower()
if suffix not in io_by_extension:
raise ValueError(f'{suffix} is not a supported format of any IO.')
Expand Down

0 comments on commit f77a411

Please sign in to comment.