common/hugio: Fix CopyDir when fs is not OS

This commit is contained in:
Bjørn Erik Pedersen 2022-08-13 18:26:16 +02:00
parent 0e0fb1b648
commit c4bbc1eeeb
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -17,7 +17,6 @@ import (
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"github.com/spf13/afero"
@ -53,7 +52,7 @@ func CopyFile(fs afero.Fs, from, to string) error {
// CopyDir copies a directory.
func CopyDir(fs afero.Fs, from, to string, shouldCopy func(filename string) bool) error {
fi, err := os.Stat(from)
fi, err := fs.Stat(from)
if err != nil {
return err
}