Fix sideload plugin on Windows
This commit is contained in:
parent
14cd716068
commit
0c0b3de8e4
@ -4,7 +4,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"io"
|
"io"
|
||||||
"io/fs"
|
"io/fs"
|
||||||
"path/filepath"
|
"path"
|
||||||
|
|
||||||
"git.foosoft.net/alex/goldsmith"
|
"git.foosoft.net/alex/goldsmith"
|
||||||
)
|
)
|
||||||
@ -71,15 +71,15 @@ func (self *Sideload) FileSystems(fileSystems ...fs.FS) *Sideload {
|
|||||||
return self
|
return self
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *Sideload) gatherFsFiles(context *goldsmith.Context, fileSystem sfs, path string) ([]*goldsmith.File, error) {
|
func (self *Sideload) gatherFsFiles(context *goldsmith.Context, fileSystem sfs, searchPath string) ([]*goldsmith.File, error) {
|
||||||
entries, err := fileSystem.ReadDir(path)
|
entries, err := fileSystem.ReadDir(searchPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
var files []*goldsmith.File
|
var files []*goldsmith.File
|
||||||
for _, entry := range entries {
|
for _, entry := range entries {
|
||||||
currPath := filepath.Join(path, entry.Name())
|
currPath := path.Join(searchPath, entry.Name())
|
||||||
if entry.IsDir() {
|
if entry.IsDir() {
|
||||||
currFiles, err := self.gatherFsFiles(context, fileSystem, currPath)
|
currFiles, err := self.gatherFsFiles(context, fileSystem, currPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user