common/hugio: One more fix for non-OS fs

Note that these are only used with OS fs, so no practical bugs, but still-
This commit is contained in:
Bjørn Erik Pedersen 2022-08-13 19:22:45 +02:00
parent c4bbc1eeeb
commit f5ba6fd45c
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -16,7 +16,6 @@ package hugio
import ( import (
"fmt" "fmt"
"io" "io"
"io/ioutil"
"path/filepath" "path/filepath"
"github.com/spf13/afero" "github.com/spf13/afero"
@ -66,7 +65,7 @@ func CopyDir(fs afero.Fs, from, to string, shouldCopy func(filename string) bool
return err return err
} }
entries, _ := ioutil.ReadDir(from) entries, _ := afero.ReadDir(fs, from)
for _, entry := range entries { for _, entry := range entries {
fromFilename := filepath.Join(from, entry.Name()) fromFilename := filepath.Join(from, entry.Name())
toFilename := filepath.Join(to, entry.Name()) toFilename := filepath.Join(to, entry.Name())