diff options
author | Thomas White <taw@physics.org> | 2022-03-02 09:47:25 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2022-03-02 09:47:25 +0100 |
commit | 5ca91a38d9d7cef6de138669446a614f18cbc590 (patch) | |
tree | 034796268776eb12cd002ac9cb56dc2df131a0ee /libcrystfel/src/image.c | |
parent | 1c797288d024b911b39028f25635349501721ce3 (diff) |
Move file_exists() check to right before opening the HDF5
No other code path under image_expand_frames() actually opens the file,
because HDF5s are currently the only format supporting multiple frames.
The aim of the existence check is to give a better error message
(compared to the HDF5 backtrace splurge), but it doesn't need to be done
so early. In fact, checking so early had the side-effect of breaking
indexamajig --wait-for-file.
Fixes: https://gitlab.desy.de/thomas.white/crystfel/-/issues/65
Diffstat (limited to 'libcrystfel/src/image.c')
-rw-r--r-- | libcrystfel/src/image.c | 5 |
1 files changed, 0 insertions, 5 deletions
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); |