aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/check-near-bragg5
-rwxr-xr-xscripts/check-peak-detection5
2 files changed, 10 insertions, 0 deletions
diff --git a/scripts/check-near-bragg b/scripts/check-near-bragg
index 632e1285..2130378b 100755
--- a/scripts/check-near-bragg
+++ b/scripts/check-near-bragg
@@ -78,6 +78,11 @@ while ( $line = <FH> ) {
if ( $n_seen > $skip ) {
my $statbuf = stat($filename);
+ if ( not $statbuf ) {
+ printf("Couldn't stat image file '%s' - does it exist?\n",
+ $filename);
+ exit;
+ }
my $image_mtime = $statbuf->mtime;
if ( $image_mtime > $stream_mtime ) {
printf(STDERR "WARNING: Image file is newer than stream\n");
diff --git a/scripts/check-peak-detection b/scripts/check-peak-detection
index 7d63ccb5..91d21f63 100755
--- a/scripts/check-peak-detection
+++ b/scripts/check-peak-detection
@@ -125,6 +125,11 @@ while ( $line = <FH> ) {
if ( $n_seen > $skip ) {
my $statbuf = stat($filename);
+ if ( not $statbuf ) {
+ printf("Couldn't stat image file '%s' - does it exist?\n",
+ $filename);
+ exit;
+ }
my $image_mtime = $statbuf->mtime;
if ( $image_mtime > $stream_mtime ) {
printf(STDERR "WARNING: Image file is newer than stream\n");