Fix depth filter on Windows

This commit is contained in:
Alex Yatskov 2024-05-05 19:38:30 -07:00
parent 18c519b412
commit 14cd716068
2 changed files with 3 additions and 1 deletions

View File

@ -24,7 +24,7 @@ func (self *Depth) Accept(file *goldsmith.File) bool {
return true
}
if parts := strings.Split(file.Path(), string(filepath.Separator)); len(parts) <= self.depth {
if parts := strings.Split(filepath.FromSlash(file.Path()), string(filepath.Separator)); len(parts) <= self.depth {
return true
}

2
test.bat Normal file
View File

@ -0,0 +1,2 @@
@echo off
go test ./filters/... ./plugins/...