diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check-near-bragg | 10 | ||||
-rwxr-xr-x | scripts/check-peak-detection | 6 |
2 files changed, 13 insertions, 3 deletions
diff --git a/scripts/check-near-bragg b/scripts/check-near-bragg index 467ff943..632e1285 100755 --- a/scripts/check-near-bragg +++ b/scripts/check-near-bragg @@ -15,10 +15,16 @@ if ( !($args eq "") ) { printf("Using default arguments for hdfsee: %s\n", $args); } -open(FH, $ARGV[0]); +my $file = $ARGV[0]; + +open(FH, $file); open(TMP, "> list.tmp"); -my $statbuf = stat($ARGV[0]); +my $statbuf = stat($file); +if ( not $statbuf ) { + printf("Couldn't stat stream. Check the filename.\n"); + exit; +} my $stream_mtime = $statbuf->mtime; my $in_image = 0; diff --git a/scripts/check-peak-detection b/scripts/check-peak-detection index 8f2e1378..7d63ccb5 100755 --- a/scripts/check-peak-detection +++ b/scripts/check-peak-detection @@ -36,7 +36,11 @@ if ( !($args eq "") ) { open(FH, $file); open(TMP, "> list.tmp"); -my $statbuf = stat($ARGV[0]); +my $statbuf = stat($file); +if ( not $statbuf ) { + printf("Couldn't stat stream. Check the filename.\n"); + exit; +} my $stream_mtime = $statbuf->mtime; my $in_image = 0; |