aboutsummaryrefslogtreecommitdiffhomepage
path: root/common
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2022-08-13 18:26:16 +0200
committerBjørn Erik Pedersen <[email protected]>2022-08-13 18:26:16 +0200
commitc4bbc1eeeb4b6730593dc9bea7be5c0d879cf90d (patch)
treee0e8ab06698adfef1a06613e42857bfb5876ec3b /common
parent0e0fb1b6487c51112ef04466e80726b2252eb6a2 (diff)
downloadhugo-c4bbc1eeeb4b6730593dc9bea7be5c0d879cf90d.tar.gz
hugo-c4bbc1eeeb4b6730593dc9bea7be5c0d879cf90d.zip
common/hugio: Fix CopyDir when fs is not OS
Diffstat (limited to 'common')
-rw-r--r--common/hugio/copy.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/common/hugio/copy.go b/common/hugio/copy.go
index 7c52f8723..cd2eac036 100644
--- a/common/hugio/copy.go
+++ b/common/hugio/copy.go
@@ -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
}