]> granicus.if.org Git - sudo/commitdiff
If the file given to install is a path, only use the basename of the
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 23 Mar 2008 14:12:19 +0000 (14:12 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 23 Mar 2008 14:12:19 +0000 (14:12 +0000)
file when building the destination path.

install-sh

index 686626bf1c5a409cf4799a814a87d7d95da12029..cf3081f065f2a2e58de8d37e0a8974c57195d712 100755 (executable)
@@ -182,7 +182,7 @@ fi
 
 ##  Get the destination and a temp file in the destination diretory.
 if [ -d "$2" ] ; then
-    DEST="$2/$1"
+    DEST="$2/`basename $1`"
     TEMP="$2/$$.tmp"
 else
     DEST="$2"