]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
Fix htimes /: operation not permitted error on config changes
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 29 Sep 2022 09:37:38 +0000 (11:37 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 29 Sep 2022 10:27:25 +0000 (12:27 +0200)
Regression introduced in v0.104.1.

commands/commandeer.go

index 5e5e1b3ab97a8c158d01f61d135652782f57186f..a66601dfab2904d0ec06ba98291ccc9acbab74f6 100644 (file)
@@ -79,8 +79,8 @@ type commandeer struct {
        changeDetector *fileChangeDetector
 
        // We need to reuse these on server rebuilds.
-       // These 2 will be different if --renderStaticToDisk is set.
        publishDirFs       afero.Fs
+       publishDirStaticFs afero.Fs
        publishDirServerFs afero.Fs
 
        h    *hugoBuilderCommon
@@ -170,6 +170,7 @@ func (c *commandeer) Set(key string, value any) {
 
 func (c *commandeer) initFs(fs *hugofs.Fs) error {
        c.publishDirFs = fs.PublishDir
+       c.publishDirStaticFs = fs.PublishDirStatic
        c.publishDirServerFs = fs.PublishDirServer
        c.DepsCfg.Fs = fs
 
@@ -426,6 +427,7 @@ func (c *commandeer) loadConfig() error {
                if c.publishDirFs != nil {
                        // Need to reuse the destination on server rebuilds.
                        fs.PublishDir = c.publishDirFs
+                       fs.PublishDirStatic = c.publishDirStaticFs
                        fs.PublishDirServer = c.publishDirServerFs
                } else {
                        if c.renderStaticToDisk {