1
0
mirror of https://github.com/golang/go synced 2024-09-30 11:18:33 -06:00

Revert "os: handle long path in RemoveAll for windows"

This reverts CL 214437.

Does not fix the issue, and the test was wrong so it did not detect that it did not fix the issue.

Updates #36375

Change-Id: I6a4112035a1e90f4fdafed6fdf4ec9dfc718b571
Reviewed-on: https://go-review.googlesource.com/c/go/+/214601
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Ian Lance Taylor 2020-01-13 23:34:53 +00:00
parent 4ead7e8cc4
commit 563287ae06
2 changed files with 0 additions and 21 deletions

View File

@ -27,7 +27,6 @@ func removeAll(path string) error {
} }
// Simple case: if Remove works, we're done. // Simple case: if Remove works, we're done.
path = fixLongPath(path)
err := Remove(path) err := Remove(path)
if err == nil || IsNotExist(err) { if err == nil || IsNotExist(err) {
return nil return nil

View File

@ -206,26 +206,6 @@ func TestRemoveAllLongPath(t *testing.T) {
} }
} }
func TestRemoveAllLongPathWindows(t *testing.T) {
startPath, err := ioutil.TempDir("", "TestRemoveAllLongPath-")
if err != nil {
t.Fatalf("Could not create TempDir: %s", err)
}
defer RemoveAll(startPath)
// Make a long path
err = MkdirAll(filepath.Join(startPath, "foo", "bar", strings.Repeat("a", 150),
strings.Repeat("b", 150)), ModePerm)
if err != nil {
t.Fatal(err)
}
err = RemoveAll("foo")
if err != nil {
t.Fatal(err)
}
}
func TestRemoveAllDot(t *testing.T) { func TestRemoveAllDot(t *testing.T) {
prevDir, err := Getwd() prevDir, err := Getwd()
if err != nil { if err != nil {