diff options
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 { |