]> rtime.felk.cvut.cz Git - novaboot.git/commitdiff
Fix warning
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 21 Oct 2013 17:57:11 +0000 (19:57 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 21 Oct 2013 17:57:11 +0000 (19:57 +0200)
novaboot

index 5168ae75055101de1e310def9ce8f9830e9c25b1..60af21d922439305f7750dd59f040a7ca50e2008 100755 (executable)
--- a/novaboot
+++ b/novaboot
@@ -72,7 +72,7 @@ my @cfgs;
     # not to the novaboot script. The problem with this approach is that
     # when a script is run as "novaboot <options> <script>" then $ARGV[0]
     # contains the first option. Hence the -f check.
-    my $dir = abs_path($invocation_dir . ((-f $ARGV[0]) ? '/'.dirname($ARGV[0]) : ''));
+    my $dir = abs_path($invocation_dir . (($ARGV[0] && -f $ARGV[0]) ? '/'.dirname($ARGV[0]) : ''));
     while (-d $dir && $dir ne "/") {
        push @cfgs, "$dir/.novaboot" if -r "$dir/.novaboot";
        $dir = abs_path($dir."/..");