// such as NUL and COM1.
// - On Unix, [Root.Chmod], [Root.Chown], and [Root.Chtimes] are vulnerable to a race condition.
// If the target of the operation is changed from a regular file to a symlink
-// while the operation is in progress, the operation may be peformed on the link
+// while the operation is in progress, the operation may be performed on the link
// rather than the link target.
// - When GOOS=js, Root is vulnerable to TOCTOU (time-of-check-time-of-use)
// attacks in symlink validation, and cannot ensure that operations will not
return r.Stat(name)
}
-// isValidRootFSPath reprots whether name is a valid filename to pass a Root.FS method.
+// isValidRootFSPath reports whether name is a valid filename to pass a Root.FS method.
func isValidRootFSPath(name string) bool {
if !fs.ValidPath(name) {
return false