]> Cypherpunks repositories - gostls13.git/commit
os: handle trailing slashes in os.RemoveDir on Windows
authorDamien Neil <dneil@google.com>
Thu, 10 Apr 2025 20:58:17 +0000 (13:58 -0700)
committerGopher Robot <gobot@golang.org>
Tue, 15 Apr 2025 18:17:39 +0000 (11:17 -0700)
commit79b809afb325ae266497e21597f126a3e98a1ef7
treeb398637580bf088cbfb5b4ff5733e48336b53b70
parent396a48bea6f2dc07ef103da298eec05cb6167892
os: handle trailing slashes in os.RemoveDir on Windows

CL 661575 inadvertently caused os.RemoveDir on Windows to
fail when given a path with a trailing / or \, due to the
splitPath function not correctly stripping trailing
separators.

Fixes #73317

Change-Id: I21977b94bb08ff1e563de6f5f16a4bdf5024a15e
Reviewed-on: https://go-review.googlesource.com/c/go/+/664715
Auto-Submit: Damien Neil <dneil@google.com>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
src/os/export_windows_test.go
src/os/os_windows_test.go
src/os/path_windows.go
src/os/removeall_test.go