diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-03-21 09:35:15 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-04-08 13:26:17 +0200 |
commit | d070bdf10f14d233288f7318a4e9f7555f070a65 (patch) | |
tree | fff8d59f98bdab3027bb45c4e10ca88594332872 /hugofs/hashing_fs.go | |
parent | b08193971a821fc27e549a73120c15e5e5186775 (diff) |
Rework the Destination filesystem to make --renderStaticToDisk work
See #9626
Diffstat (limited to 'hugofs/hashing_fs.go')
-rw-r--r-- | hugofs/hashing_fs.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/hugofs/hashing_fs.go b/hugofs/hashing_fs.go index d7b6329c9..d15ba5863 100644 --- a/hugofs/hashing_fs.go +++ b/hugofs/hashing_fs.go @@ -22,7 +22,10 @@ import ( "github.com/spf13/afero" ) -var _ afero.Fs = (*md5HashingFs)(nil) +var ( + _ afero.Fs = (*md5HashingFs)(nil) + _ FilesystemUnwrapper = (*md5HashingFs)(nil) +) // FileHashReceiver will receive the filename an the content's MD5 sum on file close. type FileHashReceiver interface { @@ -45,6 +48,10 @@ func NewHashingFs(delegate afero.Fs, hashReceiver FileHashReceiver) afero.Fs { return &md5HashingFs{Fs: delegate, hashReceiver: hashReceiver} } +func (fs *md5HashingFs) UnwrapFilesystem() afero.Fs { + return fs.Fs +} + func (fs *md5HashingFs) Create(name string) (afero.File, error) { f, err := fs.Fs.Create(name) if err == nil { |