From b30e3ab07b55057f00a24b4e82a5bd6466a98b2c Mon Sep 17 00:00:00 2001 From: olebeck <31539311+olebeck@users.noreply.github.com> Date: Sat, 13 Jul 2024 17:16:42 +0200 Subject: [PATCH] =?UTF-8?q?remove=20=C2=A7=20from=20pack=20names=20in=20wo?= =?UTF-8?q?rlds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handlers/worlds/packs.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handlers/worlds/packs.go b/handlers/worlds/packs.go index 77a2003..b59bdba 100644 --- a/handlers/worlds/packs.go +++ b/handlers/worlds/packs.go @@ -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" ) @@ -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 {