ref: 7f8c46e27f55c89bef41f7e089d1f6f276c1696c
parent: caf8b04afcc3295dddf8521fb005ce47a6031ba2
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;
--
⑨