From ed2b3a79fb3d851369a226ab310e2d0512cd192e Mon Sep 17 00:00:00 2001 From: freesource Date: Tue, 23 Oct 2001 07:06:58 +0000 Subject: [PATCH] This is pretty good, probably could just check for -x, but can't be sure if things aren't staying within /tmp or a new value for $tmp. --- swim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/swim b/swim index 89051a3..9c1a722 100755 --- a/swim +++ b/swim @@ -811,7 +811,7 @@ sub command { (-x $tmp && !-w $tmp) || - (!-x && -w $tmp) + (!-x $tmp && -w $tmp) ) { print STDERR "swim: $tmp is not "; @@ -829,7 +829,7 @@ sub command { print STDERR "/" if !-w $tmp || !-r $tmp; print STDERR "executable" if !-x $tmp; print STDERR " by your effective uid/gid " . - "in $ENV{HOME}/.swimrc\n"; + "in $ENV{HOME}/.swim/swimrc\n"; return "tmp not-writable"; } $commands{"check"} = 1; @@ -861,7 +861,7 @@ sub command { (-x $tmp && !-w $tmp) || - (!-x && -w $tmp) + (!-x $tmp && -w $tmp) ) { print STDERR "swim: $tmp is not "; @@ -879,7 +879,7 @@ sub command { print STDERR "/" if !-w $tmp || !-r $tmp; print STDERR "executable" if !-x $tmp; print STDERR " by your effective uid/gid " . - "in $ENV{HOME}/.swimrc\n"; + "in $ENV{HOME}/.swim/swimrc\n"; return "tmp not-writable"; }