From b702a26cf8f2298de6d264c1cbc09042e2b0ac22 Mon Sep 17 00:00:00 2001 From: Sean Liao Date: Sat, 28 Dec 2024 15:10:21 -0500 Subject: [PATCH] os: mention fsys modifications during CopyFS Fixes #70465 Change-Id: I47055df9ca5b1df21a361b0b8eea4c7d157e6403 Reviewed-on: https://go-review.googlesource.com/c/go/+/639156 Commit-Queue: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov --- src/os/dir.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/os/dir.go b/src/os/dir.go index 04392193aa..939b208d8c 100644 --- a/src/os/dir.go +++ b/src/os/dir.go @@ -145,6 +145,9 @@ func ReadDir(name string) ([]DirEntry, error) { // // Symbolic links in dir are followed. // +// New files added to fsys (including if dir is a subdirectory of fsys) +// while CopyFS is running are not guaranteed to be copied. +// // Copying stops at and returns the first error encountered. func CopyFS(dir string, fsys fs.FS) error { return fs.WalkDir(fsys, ".", func(path string, d fs.DirEntry, err error) error { -- 2.48.1