From 3ccf5ee620da7e0ba61ea3aa404c80043f1f3c7f Mon Sep 17 00:00:00 2001 From: Xhofe Date: Sat, 5 Mar 2022 15:33:04 +0800 Subject: [PATCH] fix: ipa plist key --- server/controllers/other.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/controllers/other.go b/server/controllers/other.go index 34c83be2ead..efbdc6d1086 100644 --- a/server/controllers/other.go +++ b/server/controllers/other.go @@ -33,11 +33,13 @@ func Plist(c *gin.Context) { name := utils.Base(u) u = uUrl.String() ipaIndex := strings.Index(name, ".ipa") + decodeName := name if ipaIndex != -1 { name = name[:ipaIndex] - decodeName, err := url.PathUnescape(name) + decodeName = name + tmp, err := url.PathUnescape(name) if err == nil { - name = decodeName + decodeName = tmp } } name = strings.ReplaceAll(name, "<", "[") @@ -71,7 +73,7 @@ func Plist(c *gin.Context) { -`, u, name, name) +`, u, name, decodeName) c.Header("Content-Type", "application/xml;charset=utf-8") c.Status(200) _, _ = c.Writer.WriteString(plist)