.ssh/: Is a directory

Darren Tucker dtucker at zip.com.au
Thu Jan 1 16:05:30 EST 2004


Darren Tucker wrote:
> Index: scp.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/ssh/scp.c,v
> retrieving revision 1.113
> diff -u -p -r1.113 scp.c
> --- scp.c	23 Nov 2003 23:21:21 -0000	1.113
> +++ scp.c	1 Jan 2004 04:55:59 -0000
> @@ -736,7 +736,8 @@ sink(int argc, char **argv)
>  		verifydir(targ);
>  
>  	(void) atomicio(vwrite, remout, "", 1);
> -	if (stat(targ, &stb) == 0 && S_ISDIR(stb.st_mode))
> +	if ((stat(targ, &stb) == 0 && S_ISDIR(stb.st_mode)) ||
> +	    strlen(targ) > 0 && targ[strlen(targ) - 1] == '/')
>  		targisdir = 1;
>  	for (first = 1;; first = 0) {
>  		cp = buf;
> Index: sshd.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/ssh/sshd.c,v

Err, ignore the sshd part, it's from an unrelated change.

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
     Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.




More information about the openssh-unix-dev mailing list