diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5repack/h5repack_main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c index 8221317..116c6cf 100644 --- a/tools/h5repack/h5repack_main.c +++ b/tools/h5repack/h5repack_main.c @@ -97,6 +97,14 @@ int main(int argc, char **argv) { infile = argv[ opt_ind ]; outfile = argv[ opt_ind + 1 ]; + + if ( strcmp( infile, outfile ) == 0 ) + { + error_msg(progname, "file names cannot be the same\n"); + usage(progname); + exit(EXIT_FAILURE); + + } } else |