mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
Rework the Destination filesystem to make --renderStaticToDisk work
See #9626
This commit is contained in:
@@ -23,6 +23,10 @@ import (
|
||||
"github.com/spf13/afero"
|
||||
)
|
||||
|
||||
var (
|
||||
_ FilesystemUnwrapper = (*baseFileDecoratorFs)(nil)
|
||||
)
|
||||
|
||||
func decorateDirs(fs afero.Fs, meta *FileMeta) afero.Fs {
|
||||
ffs := &baseFileDecoratorFs{Fs: fs}
|
||||
|
||||
@@ -151,6 +155,10 @@ type baseFileDecoratorFs struct {
|
||||
decorate func(fi os.FileInfo, filename string) (os.FileInfo, error)
|
||||
}
|
||||
|
||||
func (fs *baseFileDecoratorFs) UnwrapFilesystem() afero.Fs {
|
||||
return fs.Fs
|
||||
}
|
||||
|
||||
func (fs *baseFileDecoratorFs) Stat(name string) (os.FileInfo, error) {
|
||||
fi, err := fs.Fs.Stat(name)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user