From 45669396719a00bd22992b990998f0bf9cfafa76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sat, 22 Nov 2025 18:48:48 -0500 Subject: [PATCH] fix `groupSegmentWithTrailingSlash` to return an empty string if gid <= 0 --- models/repo/repo.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models/repo/repo.go b/models/repo/repo.go index efbd6812a1..258eebc653 100644 --- a/models/repo/repo.go +++ b/models/repo/repo.go @@ -681,6 +681,9 @@ func getGroupSegment(gid int64) string { } func groupSegmentWithTrailingSlash(gid int64) string { + if gid < 1 { + return "" + } return getGroupSegment(gid) + "/" }