зеркало из https://github.com/github/putty.git
Spotted by Tim Kosse: we were returning an incorrect path in canonify() when
we couldn't get any sense out of the server. [originally from svn r6877]
This commit is contained in:
Родитель
64f19d46d8
Коммит
cc28093380
8
psftp.c
8
psftp.c
|
@ -128,8 +128,12 @@ char *canonify(char *name)
|
||||||
assert(rreq == req);
|
assert(rreq == req);
|
||||||
canonname = fxp_realpath_recv(pktin, rreq);
|
canonname = fxp_realpath_recv(pktin, rreq);
|
||||||
|
|
||||||
if (!canonname)
|
if (!canonname) {
|
||||||
return fullname; /* even that failed; give up */
|
/* Even that failed. Restore our best guess at the
|
||||||
|
* constructed filename and give up */
|
||||||
|
fullname[i] = '/'; /* restore slash and last component */
|
||||||
|
return fullname;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We have a canonical name for all but the last path
|
* We have a canonical name for all but the last path
|
||||||
|
|
Загрузка…
Ссылка в новой задаче