aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcrystfel/src/image-hdf5.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libcrystfel/src/image-hdf5.c b/libcrystfel/src/image-hdf5.c
index 26caa13a..f698fed7 100644
--- a/libcrystfel/src/image-hdf5.c
+++ b/libcrystfel/src/image-hdf5.c
@@ -1644,5 +1644,10 @@ char **image_hdf5_expand_frames(const DataTemplate *dtempl,
int is_hdf5_file(const char *filename)
{
- return (H5Fis_hdf5(filename) > 0);
+ const char *ext = NULL;
+
+ ext = filename_extension(filename, NULL);
+ if ( ext == NULL ) return 0;
+
+ return (strcmp(ext, ".h5") == 0);
}