Go version
1.26.5 and 1.25.12
Output of go env in your module/workspace:
What did you do?
Using root.MkdirAll to create a path, with the given path ending in a / results in the following error:
mkdirat some/path/: no such file or directory
main.go to reproduce:
package main
import (
"log"
"os"
)
func main() {
r, err := os.OpenRoot(".")
if err != nil {
log.Fatalf("OpenRoot: %s", err.Error())
}
err = r.MkdirAll("some/path/", 0755)
if err != nil {
log.Fatalf("MkdirAll: %s", err.Error())
}
}
Running the above program with 1.26.5 or 1.25.12 results in the error:
GOTOOLCHAIN=go1.26.5 go run main.go
GOTOOLCHAIN=go1.25.12 go run main.go
Using prior patch versions works as expected.
Changing some/path/ to some/path is a workaround.
What did you see happen?
This error occurs:
mkdirat some/path/: no such file or directory
What did you expect to see?
No error and the entire path is created.
Go version
1.26.5 and 1.25.12
Output of
go envin your module/workspace:What did you do?
Using
root.MkdirAllto create a path, with the given path ending in a/results in the following error:main.goto reproduce:Running the above program with 1.26.5 or 1.25.12 results in the error:
Using prior patch versions works as expected.
Changing
some/path/tosome/pathis a workaround.What did you see happen?
This error occurs:
What did you expect to see?
No error and the entire path is created.