ref: 05d0456a3037effc4894b56acf49b4a31e3bfe8f
parent: 7cd0b81c83ec1efa1cfa7f947e899993b783792b
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Oct 3 11:26:45 EDT 2023
upas/fs: don't try to fstat a renamed fd cwfs apparently can get unhappy about it.
--- a/sys/src/cmd/upas/fs/idx.c
+++ b/sys/src/cmd/upas/fs/idx.c
@@ -271,7 +271,8 @@
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;