diff options
author | aiju <devnull@localhost> | 2018-03-04 19:52:35 +0000 |
---|---|---|
committer | aiju <devnull@localhost> | 2018-03-04 19:52:35 +0000 |
commit | 633397bfda41efb7c3c9a4173cedfe8e45ea83a4 (patch) | |
tree | b6acf1bcb2284c408f019950de49a78ebb474bb5 /sys/src/cmd/sshfs.c | |
parent | 8e654cf76112ffe67ff1649fd0e570975a08a823 (diff) |
sshfs: update qid and filename on Tcreate
Diffstat (limited to 'sys/src/cmd/sshfs.c')
-rw-r--r-- | sys/src/cmd/sshfs.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/src/cmd/sshfs.c b/sys/src/cmd/sshfs.c index e42b7807a..5266ec799 100644 --- a/sys/src/cmd/sshfs.c +++ b/sys/src/cmd/sshfs.c @@ -934,7 +934,7 @@ recvproc(void *) SFid *sf; int t, id; u32int code; - char *msg, *lang, *hand; + char *msg, *lang, *hand, *s; int msgn, langn, handn; int okresp; char *e; @@ -1011,6 +1011,14 @@ recvproc(void *) sf->handn = handn; sf->hand = emalloc9p(sf->handn); memcpy(sf->hand, hand, sf->handn); + if(r->req->ifcall.type == Tcreate){ + s = sf->fn; + sf->fn = pathcat(s, r->req->ifcall.name); + free(s); + sf->qid = (Qid){qidcalc(sf->fn), 0, (r->req->ifcall.perm & DMDIR) != 0 ? QTDIR : 0}; + r->req->ofcall.qid = sf->qid; + r->req->fid->qid = sf->qid; + } wunlock(sf); if(r->req->ifcall.type == Tread){ r->req->aux = nil; |