summaryrefslogtreecommitdiffstats
path: root/hugolib/filesystems
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-03-07 18:08:39 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-03-08 09:51:59 +0100
commit0e0d672bcba51a6efc75656de37659e85edd234b (patch)
treebd01b32e3f7bebd803574d060c655722f7b34e70 /hugolib/filesystems
parent19f816f77e9c0a9caddfd112d525bad8b717da44 (diff)
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
Diffstat (limited to 'hugolib/filesystems')
-rw-r--r--hugolib/filesystems/basefs.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/hugolib/filesystems/basefs.go b/hugolib/filesystems/basefs.go
index 04648c25f..2e32932c6 100644
--- a/hugolib/filesystems/basefs.go
+++ b/hugolib/filesystems/basefs.go
@@ -68,7 +68,7 @@ type BaseFs struct {
// This usually maps to /my-project/public.
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
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))
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{
SourceFs: sourceFs,