From ab5c6990a55cbb11d97f857b4619b83fddda3d18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 12 Nov 2021 09:28:27 +0100 Subject: [PATCH] commands: Fix missing file locking in server partial render Fixes #9162 --- commands/hugo.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commands/hugo.go b/commands/hugo.go index 4f011a33b..6be3776bc 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -765,7 +765,9 @@ func (c *commandeer) partialReRender(urls ...string) error { for _, url := range urls { visited[url] = true } - return c.hugo().Build(hugolib.BuildCfg{NoBuildLock: true, RecentlyVisited: visited, PartialReRender: true, ErrRecovery: c.wasError}) + + // Note: We do not set NoBuildLock as the file lock is not acquired at this stage. + return c.hugo().Build(hugolib.BuildCfg{NoBuildLock: false, RecentlyVisited: visited, PartialReRender: true, ErrRecovery: c.wasError}) } func (c *commandeer) fullRebuild(changeType string) {