From 76997a60a1bb9ad34684122b5701bafb2a68e47f Mon Sep 17 00:00:00 2001 From: Trit0 Date: Sun, 29 Jun 2025 20:04:14 -0400 Subject: [PATCH] chui tanner --- lib/provider/provider.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/provider/provider.go b/lib/provider/provider.go index 4f2ee53..4dc97d6 100644 --- a/lib/provider/provider.go +++ b/lib/provider/provider.go @@ -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, "/")