aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2024-05-06 10:32:17 +0200
committerThomas White <taw@physics.org>2024-05-06 10:32:17 +0200
commitc7a602f5d1e1109e341f25bad264a11f2beec9b3 (patch)
tree0e433945e15edaa43bdf6e2f1f2a48ecceff7898
parent16f4ffd1445c09d9e22e941930686243d1214105 (diff)
indexamajig: Avoid is_hdf5_file("-", ...)
With thanks to biochem-fan. Fixes: https://github.com/taw10/crystfel/issues/12
-rw-r--r--src/indexamajig.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index aa0db210..9416d234 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -1241,7 +1241,10 @@ int main(int argc, char *argv[])
return 1;
}
- if ( (args.filename != NULL) && is_hdf5_file(args.filename, &err) ) {
+ if ( (args.filename != NULL)
+ && (strcmp(args.filename, "-") != 0)
+ && is_hdf5_file(args.filename, &err) )
+ {
ERROR("Your input file appears to be an HDF5 file.\n");
ERROR("The input file should be a list of data files, not the "
"data file itself.\n");