From 654c18f96023b7d580d6048b84417cad66199645 Mon Sep 17 00:00:00 2001 From: Yanbing Date: Tue, 10 Jan 2017 20:21:40 -0800 Subject: [PATCH] SCP issue fix: backslashs in username (https://github.com/PowerShell/Win32-OpenSSH/issues/471) --- scp.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scp.c b/scp.c index e65b46631..f0cff40b8 100644 --- a/scp.c +++ b/scp.c @@ -595,12 +595,17 @@ main(int argc, char **argv) #ifdef WINDOWS /* * To support both Windows and Unix style paths - * convert '\\' to '/' in rest of arguments + * convert '\\' to '/' in path portion of rest arguments */ { int i; - for (i = 0; i < argc; i++) - convertToForwardslash(argv[i]); + char *p; + for (i = 0; i < argc; i++) { + if(p = colon(argv[i])) + convertToForwardslash(p); + else + convertToForwardslash(argv[i]); + } } #endif /* WINDOWS */