From: Anthony Fok Date: Sat, 29 May 2021 03:35:48 +0000 (-0600) Subject: Fix invalid timestamp of the "public" folder X-Git-Tag: v0.84.0~31 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=26ae12c0c64b847d24bde60d7d710ea2efcb40d4;p=brevno-suite%2Fhugo Fix invalid timestamp of the "public" folder Special thanks to both Richard Mortimer (@oldelvet) and Joshua M. Clulow (@jclulow) for their analysis and suggested fix: * https://github.com/gohugoio/hugo/issues/6161#issuecomment-574336088 * https://github.com/gohugoio/hugo/issues/6161#issuecomment-596805273 Fixes #6161 --- diff --git a/hugofs/fileinfo.go b/hugofs/fileinfo.go index d6832128..17fb62ea 100644 --- a/hugofs/fileinfo.go +++ b/hugofs/fileinfo.go @@ -280,7 +280,7 @@ func (fi *dirNameOnlyFileInfo) Mode() os.FileMode { } func (fi *dirNameOnlyFileInfo) ModTime() time.Time { - return time.Time{} + return time.Now() } func (fi *dirNameOnlyFileInfo) IsDir() bool {