Skip to content

Commit 03c16d3

Browse files
committed
tests: fix test on Windows
1 parent 4b11fec commit 03c16d3

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

dirent_portable.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ package fastwalk
88
import (
99
"io/fs"
1010
"os"
11-
"runtime"
1211
"sort"
1312
"sync"
1413

@@ -32,13 +31,6 @@ func (d *portableDirent) Depth() int {
3231
}
3332

3433
func (d *portableDirent) Stat() (fs.FileInfo, error) {
35-
if runtime.GOOS == "windows" {
36-
// On Windows use Info() if the file is not a symlink since
37-
// IIRC the result is cached when the FileInfo is created.
38-
if d.DirEntry.Type()&fs.ModeSymlink != 0 {
39-
return d.Info()
40-
}
41-
}
4234
return os.Stat(d.parent + string(os.PathSeparator) + d.Name())
4335
}
4436

0 commit comments

Comments
 (0)