From 9d0077d1a4ec1fa5fffd44b18037e7a606e49a1b Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Wed, 14 Aug 2024 12:27:01 +0200 Subject: [PATCH] Fixed incorrect paths on Windows --- src/fs/Walk_windows.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/fs/Walk_windows.go b/src/fs/Walk_windows.go index 37e284c..ab0b771 100644 --- a/src/fs/Walk_windows.go +++ b/src/fs/Walk_windows.go @@ -12,11 +12,13 @@ import ( // It doesn't distinguish between files and directories. func Walk(directory string, callBack func(string)) error { return filepath.WalkDir(directory, func(path string, d fs.DirEntry, err error) error { - if strings.HasPrefix(d.Name(), ".") { + fileName := d.Name() + + if strings.HasPrefix(fileName, ".") { return filepath.SkipDir } - callBack(path) + callBack(fileName) return nil }) }