Skip to content

Commit

Permalink
remove § from pack names in worlds
Browse files Browse the repository at this point in the history
  • Loading branch information
olebeck committed Jul 13, 2024
1 parent ca65de6 commit b30e3ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions handlers/worlds/packs.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/bedrock-tool/bedrocktool/utils"
"github.com/flytam/filenamify"
"github.com/sandertv/gophertunnel/minecraft/resource"
"github.com/sandertv/gophertunnel/minecraft/text"
"github.com/sirupsen/logrus"
)

Expand Down Expand Up @@ -93,6 +94,7 @@ func (w *worldsHandler) AddPacks(worldName string, fs utils.WriterFS) error {
if packIds := packNames[packName]; len(packIds) > 1 {
packName = fmt.Sprintf("%s_%d", packName, slices.Index(packIds, pack.UUID()))
}
packName = text.Clean(packName)
packName, _ = filenamify.FilenamifyV2(packName)
err := writePackToFs(pack, fs, path.Join("resource_packs", packName))
if err != nil {
Expand Down

0 comments on commit b30e3ab

Please sign in to comment.