From 0bd5696e3ccd0859cae54348f8536dee265eb27c Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 30 Sep 2020 17:47:17 +0200 Subject: image_expand_frames: Report non-existent file properly --- libcrystfel/src/image.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c index 0bd1f478..8ad091ba 100644 --- a/libcrystfel/src/image.c +++ b/libcrystfel/src/image.c @@ -926,6 +926,11 @@ 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); -- cgit v1.2.3