chui tanner

This commit is contained in:
Trit0 2025-06-29 20:04:14 -04:00 committed by TristanBrault
parent 34864e96ac
commit 76997a60a1

View File

@ -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, "/")