mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
common/hugio: Fix CopyDir when fs is not OS
This commit is contained in:
parent
0e0fb1b648
commit
c4bbc1eeeb
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue