aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-09-30 17:47:17 +0200
committerThomas White <taw@physics.org>2020-09-30 17:47:17 +0200
commit0bd5696e3ccd0859cae54348f8536dee265eb27c (patch)
treefb272334fda5d780ce4267c67e961e98c3489e2a
parent95d812b9f9aadff2d0681729e01802e845e15c09 (diff)
image_expand_frames: Report non-existent file properly
-rw-r--r--libcrystfel/src/image.c5
1 files changed, 5 insertions, 0 deletions
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);