Skip to content

Commit

Permalink
common/hugio: Fix CopyDir when fs is not OS
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Aug 13, 2022
1 parent 0e0fb1b commit c4bbc1e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions common/hugio/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"

"github.com/spf13/afero"
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit c4bbc1e

Please sign in to comment.