fd06d6
--- a/scp.c	
fd06d6
+++ a/scp.c	
fd06d6
@@ -1084,6 +1084,10 @@ sink(int argc, char **argv)
fd06d6
 			free(vect[0]);
fd06d6
 			continue;
fd06d6
 		}
fd06d6
+		if (buf[0] == 'C' && ! exists && np[strlen(np)-1] == '/') {
fd06d6
+			errno = ENOTDIR;
fd06d6
+			goto bad;
fd06d6
+		}
fd06d6
 		omode = mode;
fd06d6
 		mode |= S_IWUSR;
fd06d6
 		if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) {
fd06d6
--