From 5d09bcdda5ee7bcec251051eb24ec41e3f06b650 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 22 Oct 2020 11:44:44 +0200 Subject: image_expand_frames: When files are not HDF5, just return null events --- libcrystfel/src/image.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c index 8ad091ba..52e7d91f 100644 --- a/libcrystfel/src/image.c +++ b/libcrystfel/src/image.c @@ -935,8 +935,13 @@ char **image_expand_frames(const DataTemplate *dtempl, return image_hdf5_expand_frames(dtempl, filename, n_frames); } else { - ERROR("Can only expand HDF5 files\n"); - return NULL; + char **list; + list = malloc(sizeof(char *)); + if ( list == NULL ) return NULL; + list[0] = strdup("//"); + if ( list[0] == NULL ) return NULL; + *n_frames = 1; + return list; } } -- cgit v1.2.3