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 /hugolib/hugo_sites_build.go | |
parent | b08193971a821fc27e549a73120c15e5e5186775 (diff) |
Rework the Destination filesystem to make --renderStaticToDisk work
See #9626
Diffstat (limited to 'hugolib/hugo_sites_build.go')
-rw-r--r-- | hugolib/hugo_sites_build.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hugolib/hugo_sites_build.go b/hugolib/hugo_sites_build.go index bf52277a9..4616b6dbb 100644 --- a/hugolib/hugo_sites_build.go +++ b/hugolib/hugo_sites_build.go @@ -496,9 +496,9 @@ func (h *HugoSites) writeBuildStats() error { return err } - // Write to the destination, too, if a mem fs is in play. - if h.Fs.Source != hugofs.Os { - if err := afero.WriteFile(h.Fs.Destination, filename, js, 0666); err != nil { + // Write to the destination as well if it's a in-memory fs. + if !hugofs.IsOsFs(h.Fs.Source) { + if err := afero.WriteFile(h.Fs.WorkingDirWritable, filename, js, 0666); err != nil { return err } } |