From 91f12e26a4fa811cb3e8a2914746e0fa5291922f Mon Sep 17 00:00:00 2001 From: Azareal Date: Tue, 23 Jul 2019 20:41:34 +1000 Subject: [PATCH] Don't forget this bit. Updates #59 --- common/theme.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/theme.go b/common/theme.go index 21efe8a5..40fc42b5 100644 --- a/common/theme.go +++ b/common/theme.go @@ -17,6 +17,7 @@ import ( "path/filepath" "reflect" "strings" + "strconv" "text/template" "github.com/Azareal/Gosora/common/phrases" @@ -166,7 +167,7 @@ func (theme *Theme) AddThemeStaticFiles() error { hasher.Write(data) checksum := hex.EncodeToString(hasher.Sum(nil)) - StaticFiles.Set("/static/"+theme.Name+path, SFile{data, gzipData, checksum,theme.Name+path + "?h=" + checksum, 0, int64(len(data)), int64(len(gzipData)), mime.TypeByExtension(ext), f, f.ModTime().UTC().Format(http.TimeFormat)}) + StaticFiles.Set("/static/"+theme.Name+path, SFile{data, gzipData, checksum,theme.Name+path + "?h=" + checksum, 0, int64(len(data)), int64(len(gzipData)),strconv.Itoa(len(gzipData)), mime.TypeByExtension(ext), f, f.ModTime().UTC().Format(http.TimeFormat)}) DebugLog("Added the '/" + theme.Name + path + "' static file for theme " + theme.Name + ".") return nil