chui tanner
This commit is contained in:
parent
c5086f0ecc
commit
49ddcfe130
@ -204,7 +204,7 @@ func GetConjureGameInfo() []models.Game {
|
||||
|
||||
fmt.Println("Contents of metadata.txt:")
|
||||
metadata, err := io.ReadAll(rc)
|
||||
game := parseGameInfo(metadata)
|
||||
game := parseGameInfo([]byte(escapeBackslashes(string(metadata))))
|
||||
fmt.Println(game.ThumbnailPath)
|
||||
game.ThumbnailPath = filepath.Join(conjBase, game.ThumbnailPath)
|
||||
game.ImagePath = filepath.Join(conjBase, game.ImagePath)
|
||||
@ -224,6 +224,12 @@ func GetConjureGameInfo() []models.Game {
|
||||
return games
|
||||
}
|
||||
|
||||
// Function to escape backslashes in the YAML string
|
||||
func escapeBackslashes(input string) string {
|
||||
// Replace every single backslash with double backslashes
|
||||
return strings.ReplaceAll(input, `\`, `\\`)
|
||||
}
|
||||
|
||||
// Helper to print tree-like structure
|
||||
func printIndentedPath(path string) {
|
||||
parts := strings.Split(path, "/")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user