From 88ebfd13b651c9fee6c4b7f1cb3b1c4d84645f82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iruat=C3=A3=20Souza?= Date: Sat, 5 Sep 2020 13:34:49 +0200 Subject: [PATCH] wstat: update opath after a rename so we truncate the correct file after it --- u9fs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/u9fs.c b/u9fs.c index ae06496..ea0391c 100644 --- a/u9fs.c +++ b/u9fs.c @@ -1041,6 +1041,7 @@ rwstat(Fcall *rx, Fcall *tx) free(old); free(dir); free(opath); + opath = npath; } if((u64int)d.length != (u64int)~0 && truncate(opath, d.length) < 0){