Merge branch 'tristan-wip' of https://gitea.clubconjure.com/Conjure/conjure-os into tristan-wip
This commit is contained in:
commit
7f483c8d74
@ -204,7 +204,7 @@ func GetConjureGameInfo() []models.Game {
|
|||||||
|
|
||||||
fmt.Println("Contents of metadata.txt:")
|
fmt.Println("Contents of metadata.txt:")
|
||||||
metadata, err := io.ReadAll(rc)
|
metadata, err := io.ReadAll(rc)
|
||||||
game := parseGameInfo(metadata)
|
game := parseGameInfo([]byte(escapeBackslashes(string(metadata))))
|
||||||
fmt.Println(game.ThumbnailPath)
|
fmt.Println(game.ThumbnailPath)
|
||||||
game.ThumbnailPath = filepath.Join(conjBase, game.ThumbnailPath)
|
game.ThumbnailPath = filepath.Join(conjBase, game.ThumbnailPath)
|
||||||
game.ImagePath = filepath.Join(conjBase, game.ImagePath)
|
game.ImagePath = filepath.Join(conjBase, game.ImagePath)
|
||||||
@ -224,6 +224,12 @@ func GetConjureGameInfo() []models.Game {
|
|||||||
return games
|
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
|
// Helper to print tree-like structure
|
||||||
func printIndentedPath(path string) {
|
func printIndentedPath(path string) {
|
||||||
parts := strings.Split(path, "/")
|
parts := strings.Split(path, "/")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user