mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Remove the decorator from the fs used in ReadDir
There have been a site breakage reported in the wild after 0.93.1. With this commit we shoudl be back to how it behaved in 0.92.2. Closes #9609
This commit is contained in:
parent
19f816f77e
commit
0e0d672bcb
1 changed files with 4 additions and 2 deletions
|
@ -68,7 +68,7 @@ type BaseFs struct {
|
||||||
// This usually maps to /my-project/public.
|
// This usually maps to /my-project/public.
|
||||||
PublishFs afero.Fs
|
PublishFs afero.Fs
|
||||||
|
|
||||||
// A read-only filesystem from the project workDir (no theme here).
|
// A read-only filesystem starting from the project workDir.
|
||||||
WorkDir afero.Fs
|
WorkDir afero.Fs
|
||||||
|
|
||||||
theBigFs *filesystemsCollector
|
theBigFs *filesystemsCollector
|
||||||
|
@ -438,7 +438,9 @@ func NewBase(p *paths.Paths, logger loggers.Logger, options ...func(*BaseFs) err
|
||||||
|
|
||||||
publishFs := hugofs.NewBaseFileDecorator(afero.NewBasePathFs(fs.Destination, p.AbsPublishDir))
|
publishFs := hugofs.NewBaseFileDecorator(afero.NewBasePathFs(fs.Destination, p.AbsPublishDir))
|
||||||
sourceFs := hugofs.NewBaseFileDecorator(afero.NewBasePathFs(fs.Source, p.WorkingDir))
|
sourceFs := hugofs.NewBaseFileDecorator(afero.NewBasePathFs(fs.Source, p.WorkingDir))
|
||||||
workDir := hugofs.NewBaseFileDecorator(afero.NewBasePathFs(afero.NewReadOnlyFs(fs.Source), p.WorkingDir))
|
|
||||||
|
// Same as sourceFs, but no decoration. This is what's used by os.ReadDir etc.
|
||||||
|
workDir := afero.NewBasePathFs(afero.NewReadOnlyFs(fs.Source), p.WorkingDir)
|
||||||
|
|
||||||
b := &BaseFs{
|
b := &BaseFs{
|
||||||
SourceFs: sourceFs,
|
SourceFs: sourceFs,
|
||||||
|
|
Loading…
Reference in a new issue