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
This commit is contained in:
Anthony Fok 2021-05-28 21:35:48 -06:00
parent ee733085b7
commit 26ae12c0c6

View file

@ -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 {