From 76063fc2ec62adf7bb6dc66154905dec1e278179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20H=C3=BCbner?= Date: Fri, 8 Sep 2023 16:49:02 +0200 Subject: [PATCH] path separator fix --- modrinth/mrpack/index.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modrinth/mrpack/index.go b/modrinth/mrpack/index.go index 233d1cc..d6517ae 100644 --- a/modrinth/mrpack/index.go +++ b/modrinth/mrpack/index.go @@ -6,6 +6,7 @@ import ( "errors" "fmt" "io" + "strings" ) import modrinth "github.com/nothub/mrpack-install/modrinth/api" @@ -86,5 +87,10 @@ func ReadIndex(zipFile string) (*Index, error) { return nil, err } + // https://github.com/modrinth/docs/issues/85 ¯\_(ツ)_/¯ + for _, file := range index.Files { + file.Path = strings.ReplaceAll(file.Path, "\\", "/") + } + return &index, nil }