mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-16 15:02:43 +00:00
Fix filepath basename on Windows for SVG bindata (#12241)
This commit is contained in:
parent
84a419de98
commit
633f52c220
2 changed files with 3 additions and 5 deletions
|
@ -7,7 +7,6 @@
|
|||
package svg
|
||||
|
||||
import (
|
||||
"path"
|
||||
"path/filepath"
|
||||
|
||||
"code.gitea.io/gitea/modules/public"
|
||||
|
@ -22,7 +21,7 @@ func Discover() map[string]string {
|
|||
if matched {
|
||||
content, err := public.Asset(file)
|
||||
if err == nil {
|
||||
filename := path.Base(file)
|
||||
filename := filepath.Base(file)
|
||||
svgs[filename[:len(filename)-4]] = string(content)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue