aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcrystfel/src/image-hdf5.c4
-rw-r--r--libcrystfel/src/image.c5
2 files changed, 4 insertions, 5 deletions
diff --git a/libcrystfel/src/image-hdf5.c b/libcrystfel/src/image-hdf5.c
index 07e3b6b8..ce357f36 100644
--- a/libcrystfel/src/image-hdf5.c
+++ b/libcrystfel/src/image-hdf5.c
@@ -1830,6 +1830,10 @@ char **image_hdf5_expand_frames(const DataTemplate *dtempl,
return full_evs.events;
}
+ if ( !file_exists(filename) ) {
+ ERROR("File not found: %s (hdf5_expand_frames)\n", filename);
+ return NULL;
+ }
fh = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT);
if ( fh < 0 ) {
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c
index ce924b35..c86439d8 100644
--- a/libcrystfel/src/image.c
+++ b/libcrystfel/src/image.c
@@ -1506,11 +1506,6 @@ ImageFeatureList *image_read_peaks(const DataTemplate *dtempl,
char **image_expand_frames(const DataTemplate *dtempl,
const char *filename, int *n_frames)
{
- if ( !file_exists(filename) ) {
- ERROR("File not found: %s\n", filename);
- return NULL;
- }
-
if ( is_hdf5_file(filename) ) {
return image_hdf5_expand_frames(dtempl, filename,
n_frames);