Skip to content

Commit

Permalink
Handle conflicting lib name prefix blosc/blosc2
Browse files Browse the repository at this point in the history
  • Loading branch information
t20100 committed Nov 9, 2022
1 parent 21f362d commit bd177f8
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/hdf5plugin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,10 +557,19 @@ def _init_filters():
continue

# Load DLL
filename = _glob(_os.path.join(
filenames = _glob(_os.path.join(
PLUGIN_PATH, 'libh5' + name + '*' + config.filter_file_extension))
if len(filename):
filename = filename[0]
if len(filenames):
if name == 'blosc': # Handle name prefix conflict with blosc2
for filename in filenames:
if not _os.path.basename(filename).startswith('libh5blosc2'):
break # That the blosc(1) filename
else:
_logger.error("Cannot initialize filter %s: File not found", name)
continue
else:
filename = filenames[0]

else:
_logger.error("Cannot initialize filter %s: File not found", name)
continue
Expand Down

0 comments on commit bd177f8

Please sign in to comment.