upas/fs: don't try to fstat a renamed fd

cwfs apparently can get unhappy about it.
This commit is contained in:
Ori Bernstein 2023-10-03 15:26:45 +00:00
parent 7cd0b81c83
commit 05d0456a30

View file

@ -271,7 +271,8 @@ wridxfile(Mailbox *mb)
if(dirfwstat(fd, &n) == -1)
sysfatal("dirfwstat: %r");
d = dirfstat(fd);
snprint(buf, sizeof buf, "%s.idx", mb->path);
d = dirstat(buf);
if(d == nil)
sysfatal("dirfstat: %r");
mb->qid = d->qid;