projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mention more versions of Windows. (Not Vista, yet.)
[u/mdw/putty]
/
psftp.c
diff --git
a/psftp.c
b/psftp.c
index
d07ee8b
..
f77a88e
100644
(file)
--- a/
psftp.c
+++ b/
psftp.c
@@
-128,8
+128,12
@@
char *canonify(char *name)
assert(rreq == req);
canonname = fxp_realpath_recv(pktin, rreq);
assert(rreq == req);
canonname = fxp_realpath_recv(pktin, rreq);
- if (!canonname)
- return fullname; /* even that failed; give up */
+ if (!canonname) {
+ /* 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