aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorValerio mariani <valerio.mariani@desy.de>2015-07-16 15:50:51 +0200
committerThomas White <taw@physics.org>2015-07-16 17:04:25 +0200
commit5589a9a186cc1d3dc09bb9895b6b629f9bf3b15c (patch)
tree375ae5ddc65d53dac63425206afe891a5ca9ec08 /libcrystfel
parentdfae52adb31496c6780383199ef0332989fbccba (diff)
Throw an error if the path data ends with a slash
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/hdf5-file.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c
index fc4b1355..473d7da7 100644
--- a/libcrystfel/src/hdf5-file.c
+++ b/libcrystfel/src/hdf5-file.c
@@ -2131,6 +2131,11 @@ int check_path_existence(hid_t fh, const char *path)
int check;
sep = strstr(start, "/");
+ if ( strlen(sep) == 1 ) {
+ ERROR("Error: Data path ends with a / symbol\n");
+ free(path_copy);
+ return 1;
+ }
if ( sep != NULL ) {