commit d32705f63386c6e1f251a5e43f0f8421fae4a768
parent 6e30de9c53aba4a0729a70ffd3268b9ab9354f4c
Author: Matsuda Kenji <info@mtkn.jp>
Date: Thu, 11 Jan 2024 07:27:10 +0900
add comment
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/server.go b/server.go
@@ -591,6 +591,8 @@ func sOpen(ctx context.Context, c *conn, rc <-chan *request) {
}
continue
}
+ // OTRUNK is implemented by os.OpenFile's flag O_TRUNC,
+ // so the truncation shold be done by the implementor of FS.
r.fid.file, err = r.fid.fs.OpenFile(r.fid.path, r.fid.omode)
if err != nil {
setError(r, err)