]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
common/hugio: One more fix for non-OS fs
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 13 Aug 2022 17:22:45 +0000 (19:22 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 13 Aug 2022 17:22:45 +0000 (19:22 +0200)
Note that these are only used with OS fs, so no practical bugs, but still-

common/hugio/copy.go

index cd2eac0365de46cc71fcd27cac9d90658ed4af8c..8dbadc48c508102785615ed7ba6463da7f3aee1a 100644 (file)
@@ -16,7 +16,6 @@ package hugio
 import (
        "fmt"
        "io"
-       "io/ioutil"
        "path/filepath"
 
        "github.com/spf13/afero"
@@ -66,7 +65,7 @@ func CopyDir(fs afero.Fs, from, to string, shouldCopy func(filename string) bool
                return err
        }
 
-       entries, _ := ioutil.ReadDir(from)
+       entries, _ := afero.ReadDir(fs, from)
        for _, entry := range entries {
                fromFilename := filepath.Join(from, entry.Name())
                toFilename := filepath.Join(to, entry.Name())