mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
hugolib: Fix handling of zero-length files
This was a regression in Hugo 0.20. This commit makes sure that zeron-length files are not rendered to file. Fixes #3355
This commit is contained in:
@@ -61,6 +61,12 @@ func (th testHelper) assertFileContentRegexp(filename string, matches ...string)
|
||||
}
|
||||
}
|
||||
|
||||
func (th testHelper) assertFileNotExist(filename string) {
|
||||
exists, err := helpers.Exists(filename, th.Fs.Destination)
|
||||
require.NoError(th.T, err)
|
||||
require.False(th.T, exists)
|
||||
}
|
||||
|
||||
func (th testHelper) replaceDefaultContentLanguageValue(value string) string {
|
||||
defaultInSubDir := th.Cfg.GetBool("defaultContentLanguageInSubDir")
|
||||
replace := th.Cfg.GetString("defaultContentLanguage") + "/"
|
||||
|
Reference in New Issue
Block a user