From 1cbd7365b40dabf155235a9b1f0cf12a3badf0a7 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sat, 18 Jan 2014 09:18:13 -0800 Subject: [PATCH] Fix thumbnail cache filename fmt pattern bug. I noticed thumbnail files named like: {"camliVersion": 1, "camliType": "file", "fileName": "scaled:sha1-da55749abffc24004177c32e8ea00687044910b8:2000x256:tv%!d(string=2)", "parts": [ { "blobRef": "sha1-82810ad435f5354e4d8ad358a011bc221053b1bb", "size": 11239 } ] } Change-Id: I3bc729917c226622e70fb662e0413eeacfda6d93 --- pkg/server/image.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/server/image.go b/pkg/server/image.go index 398b99e4f..956c421c4 100644 --- a/pkg/server/image.go +++ b/pkg/server/image.go @@ -127,7 +127,7 @@ func (ih *ImageHandler) cached(fileRef blob.Ref) (*schema.FileReader, error) { // Key format: "scaled:" + bref + ":" + width "x" + height // where bref is the blobref of the unscaled image. func cacheKey(bref string, width int, height int) string { - return fmt.Sprintf("scaled:%v:%dx%d:tv%d", bref, width, height, images.ThumbnailVersion()) + return fmt.Sprintf("scaled:%v:%dx%d:tv%v", bref, width, height, images.ThumbnailVersion()) } // ScaledCached reads the scaled version of the image in file,