mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -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"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/spf13/afero"
|
"github.com/spf13/afero"
|
||||||
|
@ -53,7 +52,7 @@ func CopyFile(fs afero.Fs, from, to string) error {
|
||||||
|
|
||||||
// CopyDir copies a directory.
|
// CopyDir copies a directory.
|
||||||
func CopyDir(fs afero.Fs, from, to string, shouldCopy func(filename string) bool) error {
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue