From 23189f94e3761d3ef1d82b5abccf11564388b4bf Mon Sep 17 00:00:00 2001 From: "Bernhard R. Link" Date: Wed, 30 May 2012 12:03:46 +0200 Subject: [PATCH] Properly detect if given a directory name as argument. Currently running blhc with a directory name as argument results in no error except it warning there are no compiler commands in it. So check if it is a proper file (or a link to a proper file). --- bin/blhc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/blhc b/bin/blhc index b5dfa68..d5cc9d6 100755 --- a/bin/blhc +++ b/bin/blhc @@ -601,6 +601,8 @@ FILE: foreach my $file (@ARGV) { print "checking '$file'...\n" if scalar @ARGV > 1; + -f $file or die "No such file: $file"; + open my $fh, '<', $file or die $!; # Architecture of this file. -- 2.43.2