- idStr := fmt.Sprintf("_hu%s_%d", h, i.size())
-
- // Do not change for no good reason.
- const md5Threshold = 100
-
- key := conf.GetKey(i.Format)
-
- // It is useful to have the key in clear text, but when nesting transforms, it
- // can easily be too long to read, and maybe even too long
- // for the different OSes to handle.
- if len(p1)+len(idStr)+len(p2) > md5Threshold {
- key = helpers.MD5String(p1 + key + p2)
- huIdx := strings.Index(p1, "_hu")
- if huIdx != -1 {
- p1 = p1[:huIdx]
- } else {
- // This started out as a very long file name. Making it even longer
- // could melt ice in the Arctic.
- p1 = ""
- }
- } else if strings.Contains(p1, idStr) {