diff options
Diffstat (limited to 'hugofs/nosymlink_fs.go')
-rw-r--r-- | hugofs/nosymlink_fs.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hugofs/nosymlink_fs.go b/hugofs/nosymlink_fs.go index ff9503257..d3cad5e74 100644 --- a/hugofs/nosymlink_fs.go +++ b/hugofs/nosymlink_fs.go @@ -30,6 +30,10 @@ func NewNoSymlinkFs(fs afero.Fs, logger loggers.Logger, allowFiles bool) afero.F return &noSymlinkFs{Fs: fs, logger: logger, allowFiles: allowFiles} } +var ( + _ FilesystemUnwrapper = (*noSymlinkFs)(nil) +) + // noSymlinkFs is a filesystem that prevents symlinking. type noSymlinkFs struct { allowFiles bool // block dirs only @@ -67,6 +71,10 @@ func (f *noSymlinkFile) Readdirnames(count int) ([]string, error) { return fileInfosToNames(dirs), nil } +func (fs *noSymlinkFs) UnwrapFilesystem() afero.Fs { + return fs.Fs +} + func (fs *noSymlinkFs) LstatIfPossible(name string) (os.FileInfo, bool, error) { return fs.stat(name) } |