Skip to content

Commit

Permalink
fix: url encode filename for separated targets
Browse files Browse the repository at this point in the history
  • Loading branch information
budak7273 committed Jan 21, 2024
1 parent 89860fa commit c83420e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit c83420e

Please sign in to comment.