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/filter_fs.go | |
parent | b08193971a821fc27e549a73120c15e5e5186775 (diff) |
Rework the Destination filesystem to make --renderStaticToDisk work
See #9626
Diffstat (limited to 'hugofs/filter_fs.go')
-rw-r--r-- | hugofs/filter_fs.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hugofs/filter_fs.go b/hugofs/filter_fs.go index ec3897d9e..351b4d0f7 100644 --- a/hugofs/filter_fs.go +++ b/hugofs/filter_fs.go @@ -121,6 +121,10 @@ func NewFilterFs(fs afero.Fs) (afero.Fs, error) { return ffs, nil } +var ( + _ FilesystemUnwrapper = (*FilterFs)(nil) +) + // FilterFs is an ordered composite filesystem. type FilterFs struct { fs afero.Fs @@ -141,6 +145,10 @@ func (fs *FilterFs) Chown(n string, uid, gid int) error { return syscall.EPERM } +func (fs *FilterFs) UnwrapFilesystem() afero.Fs { + return fs.fs +} + func (fs *FilterFs) LstatIfPossible(name string) (os.FileInfo, bool, error) { fi, b, err := lstatIfPossible(fs.fs, name) if err != nil { |