mirror of https://github.com/perkeep/perkeep.git
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
This commit is contained in:
parent
d53107050f
commit
1cbd7365b4
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue