feat(desktop): add client release updater
Desktop Client Build / Resolve Build Metadata (push) Successful in 19s
Frontend CI / Frontend (push) Successful in 3m20s
Backend CI / Backend (push) Successful in 16m48s
Desktop Client Build / Build Desktop Client (push) Successful in 24m46s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 37s

This commit is contained in:
2026-05-25 19:23:49 +08:00
parent 41b4a765ac
commit 5f6e9f11da
46 changed files with 5508 additions and 160 deletions
+24 -6
View File
@@ -95,12 +95,9 @@ func joinEscapedPath(basePath string, extra ...string) string {
return
}
for _, segment := range strings.Split(value, "/") {
segment = strings.TrimSpace(segment)
if segment == "" {
continue
}
segments = append(segments, url.PathEscape(segment))
normalized := normalizeObjectKeyPath(value)
if normalized != "" {
segments = append(segments, strings.Split(normalized, "/")...)
}
}
@@ -114,3 +111,24 @@ func joinEscapedPath(basePath string, extra ...string) string {
}
return "/" + strings.Join(segments, "/")
}
func normalizeObjectKeyPath(value string) string {
segments := make([]string, 0)
value = strings.TrimSpace(value)
value = strings.Trim(value, "/")
if value == "" {
return ""
}
for _, segment := range strings.Split(value, "/") {
segment = strings.TrimSpace(segment)
if segment == "" {
continue
}
if decoded, err := url.PathUnescape(segment); err == nil {
segment = decoded
}
segments = append(segments, segment)
}
return strings.Join(segments, "/")
}