From 45e8afe9892ccd086471ad3acc2a146534080f4f Mon Sep 17 00:00:00 2001 From: kilo Date: Tue, 31 Oct 2017 01:37:24 +0100 Subject: [PATCH] Update template_functions.go --- templates/template_functions.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/template_functions.go b/templates/template_functions.go index 1b4e36fc..8646679c 100644 --- a/templates/template_functions.go +++ b/templates/template_functions.go @@ -251,8 +251,8 @@ func languageNameFromCode(languageCode string, T publicSettings.TemplateTfunc) s } return strings.Title(publicSettings.Translate(languageCode, string(T("language_code")))) } -func fileSize(filesize int64, T publicSettings.TemplateTfunc) template.HTML { - if filesize == 0 { +func fileSize(filesize int64, T publicSettings.TemplateTfunc, showUnknown bool) template.HTML { + if showUnknown && filesize == 0 { return T("unknown") } return template.HTML(format.FileSize(filesize))