Skip to content

Commit

Permalink
path separator fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nothub committed Sep 8, 2023
1 parent f5656cf commit 76063fc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modrinth/mrpack/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"errors"
"fmt"
"io"
"strings"
)

import modrinth "github.com/nothub/mrpack-install/modrinth/api"
Expand Down Expand Up @@ -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
}

0 comments on commit 76063fc

Please sign in to comment.