commands: Fix missing file locking in server partial render

Fixes #9162
This commit is contained in:
Bjørn Erik Pedersen 2021-11-12 09:28:27 +01:00
parent 9369d13e59
commit ab5c6990a5
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -765,7 +765,9 @@ func (c *commandeer) partialReRender(urls ...string) error {
for _, url := range urls { for _, url := range urls {
visited[url] = true 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) { func (c *commandeer) fullRebuild(changeType string) {