Commit 6d2a7389 authored by Robert Ricci's avatar Robert Ricci

Small change to eliminate a warning in some cases. Not security-related:

I was checking $ARGV[0] w/o making sure it was defined first.
parent b06ae702
......@@ -52,7 +52,7 @@ if (@ARGV && ($ARGV[0] eq "-c")) { # We were called by sshd - transform args int
if (@ARGV && ($ARGV[0] =~ /dir=(.*)/)) {
shift @ARGV;
&cd($1); # Change to given directory
} elsif($ARGV[0] eq "cd") { # also understand 'cd dir &&' or 'cd dir ;' syntax to be a little more compatible
} elsif(@ARGV && ($ARGV[0] eq "cd")) { # also understand 'cd dir &&' or 'cd dir ;' syntax to be a little more compatible
# with other shells
# Discard the cd
shift @ARGV;
......
......@@ -52,7 +52,7 @@ if (@ARGV && ($ARGV[0] eq "-c")) { # We were called by sshd - transform args int
if (@ARGV && ($ARGV[0] =~ /dir=(.*)/)) {
shift @ARGV;
&cd($1); # Change to given directory
} elsif($ARGV[0] eq "cd") { # also understand 'cd dir &&' or 'cd dir ;' syntax to be a little more compatible
} elsif(@ARGV && ($ARGV[0] eq "cd")) { # also understand 'cd dir &&' or 'cd dir ;' syntax to be a little more compatible
# with other shells
# Discard the cd
shift @ARGV;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment