Commit 563287ae authored by Ian Lance Taylor's avatar Ian Lance Taylor

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/+/214601Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 4ead7e8c
......@@ -27,7 +27,6 @@ func removeAll(path string) error {
}
// Simple case: if Remove works, we're done.
path = fixLongPath(path)
err := Remove(path)
if err == nil || IsNotExist(err) {
return nil
......
......@@ -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) {
prevDir, err := Getwd()
if err != nil {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment