From c83420e4e09675975fffe3c374583af1cf568fa1 Mon Sep 17 00:00:00 2001 From: Rob B Date: Sat, 20 Jan 2024 21:55:32 -0500 Subject: [PATCH] fix: url encode filename for separated targets --- storage/storage.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/storage.go b/storage/storage.go index da94729e..cff4ddd5 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -390,7 +390,8 @@ func SeparateModTarget(ctx context.Context, body []byte, modID, name, modVersion continue } - err = copyModFileToArchZip(file, zipWriter, strings.TrimPrefix(file.Name, target+"/")) + encodedFileName := EncodeName(strings.TrimPrefix(file.Name, target+"/")) + err = copyModFileToArchZip(file, zipWriter, encodedFileName) if err != nil { log.Err(err).Msg("failed to add file to " + target + " archive")