From 0c0b3de8e4cd6523e361d2c2bbfa9ba1d8491fad Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sun, 5 May 2024 19:56:16 -0700 Subject: [PATCH] Fix sideload plugin on Windows --- plugins/sideload/sideload.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/sideload/sideload.go b/plugins/sideload/sideload.go index 2955875..5fa68f5 100644 --- a/plugins/sideload/sideload.go +++ b/plugins/sideload/sideload.go @@ -4,7 +4,7 @@ import ( "bytes" "io" "io/fs" - "path/filepath" + "path" "git.foosoft.net/alex/goldsmith" ) @@ -71,15 +71,15 @@ func (self *Sideload) FileSystems(fileSystems ...fs.FS) *Sideload { return self } -func (self *Sideload) gatherFsFiles(context *goldsmith.Context, fileSystem sfs, path string) ([]*goldsmith.File, error) { - entries, err := fileSystem.ReadDir(path) +func (self *Sideload) gatherFsFiles(context *goldsmith.Context, fileSystem sfs, searchPath string) ([]*goldsmith.File, error) { + entries, err := fileSystem.ReadDir(searchPath) if err != nil { return nil, err } var files []*goldsmith.File for _, entry := range entries { - currPath := filepath.Join(path, entry.Name()) + currPath := path.Join(searchPath, entry.Name()) if entry.IsDir() { currFiles, err := self.gatherFsFiles(context, fileSystem, currPath) if err != nil {