X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=windows%2Fwinsftp.c;h=0776cba94bdc19f544814d26dd7e985611fcae42;hb=21101c7397e460933635a7bfed813864fc4f88fe;hp=fa052eebffc5c5b41b201c1065c5317eafbe2c9c;hpb=f7713d452d37e9b314af48bb295d418b185989b7;p=PuTTY.git diff --git a/windows/winsftp.c b/windows/winsftp.c index fa052eeb..0776cba9 100644 --- a/windows/winsftp.c +++ b/windows/winsftp.c @@ -340,14 +340,14 @@ struct WildcardMatcher { char *srcpath; }; -/* - * Return a pointer to the portion of str that comes after the last - * slash (or backslash or colon, if `local' is TRUE). - */ -static char *stripslashes(char *str, int local) +char *stripslashes(const char *str, int local) { char *p; + /* + * On Windows, \ / : are all path component separators. + */ + if (local) { p = strchr(str, ':'); if (p) str = p+1; @@ -361,7 +361,7 @@ static char *stripslashes(char *str, int local) if (p) str = p+1; } - return str; + return (char *)str; } WildcardMatcher *begin_wildcard_matching(const char *name)