Skip to content

Commit 563287a

Browse files
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 <[email protected]>
1 parent 4ead7e8 commit 563287a

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

src/os/removeall_noat.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ func removeAll(path string) error {
2727
}
2828

2929
// Simple case: if Remove works, we're done.
30-
path = fixLongPath(path)
3130
err := Remove(path)
3231
if err == nil || IsNotExist(err) {
3332
return nil

src/os/removeall_test.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -206,26 +206,6 @@ func TestRemoveAllLongPath(t *testing.T) {
206206
}
207207
}
208208

209-
func TestRemoveAllLongPathWindows(t *testing.T) {
210-
startPath, err := ioutil.TempDir("", "TestRemoveAllLongPath-")
211-
if err != nil {
212-
t.Fatalf("Could not create TempDir: %s", err)
213-
}
214-
defer RemoveAll(startPath)
215-
216-
// Make a long path
217-
err = MkdirAll(filepath.Join(startPath, "foo", "bar", strings.Repeat("a", 150),
218-
strings.Repeat("b", 150)), ModePerm)
219-
if err != nil {
220-
t.Fatal(err)
221-
}
222-
223-
err = RemoveAll("foo")
224-
if err != nil {
225-
t.Fatal(err)
226-
}
227-
}
228-
229209
func TestRemoveAllDot(t *testing.T) {
230210
prevDir, err := Getwd()
231211
if err != nil {

0 commit comments

Comments
 (0)