Skip to content

Commit 2cda46d

Browse files
committed
fix TestRemoveAll again (tested as root this time).
Fixes #22. R=r https://golang.org/cl/154069
1 parent 2643f74 commit 2cda46d

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/pkg/os/path_test.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,13 @@ func TestRemoveAll(t *testing.T) {
134134
if perr.Path != dpath {
135135
t.Fatalf("RemoveAll %q failed at %q not %q", path, perr.Path, dpath)
136136
}
137-
}
138-
139-
if err = Chmod(dpath, 0777); err != nil {
140-
t.Fatalf("Chmod %q 0777: %s", dpath, err)
141-
}
142-
for _, s := range []string{fpath, path + "/zzz"} {
143-
if _, err := Lstat(s); err == nil {
144-
t.Fatalf("Lstat %q succeeded after partial RemoveAll", s)
137+
if err = Chmod(dpath, 0777); err != nil {
138+
t.Fatalf("Chmod %q 0777: %s", dpath, err)
139+
}
140+
for _, s := range []string{fpath, path + "/zzz"} {
141+
if _, err := Lstat(s); err == nil {
142+
t.Fatalf("Lstat %q succeeded after partial RemoveAll", s)
143+
}
145144
}
146145
}
147146
if err = RemoveAll(path); err != nil {

0 commit comments

Comments
 (0)