]> asedeno.scripts.mit.edu Git - PuTTY.git/commit - unix/uxsftp.c
Centralise stripslashes() and make it OS-sensitive.
authorSimon Tatham <anakin@pobox.com>
Thu, 24 Sep 2015 16:47:10 +0000 (17:47 +0100)
committerSimon Tatham <anakin@pobox.com>
Thu, 24 Sep 2015 16:47:10 +0000 (17:47 +0100)
commit5c5ca116dbe1c62b447eaeb22d4e59db44b9a1f5
tree75d842352775658694fb93c01df4ea2515372968
parent13edf90e0a4397088085cfcd53a4311319b708b4
Centralise stripslashes() and make it OS-sensitive.

I noticed that Unix PSCP was unwantedly renaming downloaded files
which had a backslash in their names, because pscp.c's stripslashes()
treated \ as a path component separator, since it hadn't been modified
since PSCP ran on Windows only.

It also turns out that pscp.c, psftp.c and winsftp.c all had a
stripslashes(), and they didn't all have quite the same prototype. So
now there's one in winsftp.c and one in uxsftp.c, with appropriate
OS-dependent behaviour, and the ones in pscp.c and psftp.c are gone.
pscp.c
psftp.c
psftp.h
unix/uxsftp.c
windows/winsftp.c