summaryrefslogtreecommitdiffstats
path: root/commands/static_syncer.go
diff options
context:
space:
mode:
authorHyeonGyu Lee <vazrupe@naver.com>2019-08-15 16:33:47 +0900
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-08-15 09:33:47 +0200
commitea9261e856c13c1d4ae05fcca08766d410b4b65c (patch)
tree70c68f81d682dff217848bee8b215369ad4a94ea /commands/static_syncer.go
parent37f592980315de1890363d4234274a16567a6da0 (diff)
commands: Make sure the hugo field is always initialized before it's used
Wrap the field to make it accessible after initialization. Fixes #6193
Diffstat (limited to 'commands/static_syncer.go')
-rw-r--r--commands/static_syncer.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/static_syncer.go b/commands/static_syncer.go
index ab7cc4fe2..62ef28b2c 100644
--- a/commands/static_syncer.go
+++ b/commands/static_syncer.go
@@ -33,14 +33,14 @@ func newStaticSyncer(c *commandeer) (*staticSyncer, error) {
}
func (s *staticSyncer) isStatic(filename string) bool {
- return s.c.hugo.BaseFs.SourceFilesystems.IsStatic(filename)
+ return s.c.hugo().BaseFs.SourceFilesystems.IsStatic(filename)
}
func (s *staticSyncer) syncsStaticEvents(staticEvents []fsnotify.Event) error {
c := s.c
syncFn := func(sourceFs *filesystems.SourceFilesystem) (uint64, error) {
- publishDir := c.hugo.PathSpec.PublishDir
+ publishDir := c.hugo().PathSpec.PublishDir
// If root, remove the second '/'
if publishDir == "//" {
publishDir = helpers.FilePathSeparator