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>
}
// Simple case: if Remove works, we're done.
- path = fixLongPath(path)
err := Remove(path)
if err == nil || IsNotExist(err) {
return nil
}
}
-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) {
prevDir, err := Getwd()
if err != nil {