Added alternative Flatpak Minecraft path

Closes #8
This commit is contained in:
Felipe Martin 2020-12-01 18:14:09 +01:00
parent c5341a7e5b
commit aa007eb2da
Signed by: fmartingr
GPG Key ID: 716BC147715E716F
1 changed files with 3 additions and 1 deletions

View File

@ -38,7 +38,9 @@ func GetGames() []games.Game {
// Flatpak minecraft
minecraftFlatpak := games.Game{Name: "Minecraft", Platform: "PC", Notes: "Flatpak"}
getScreenshotsFromPath(&minecraftFlatpak, "~/.var/app/com.mojang.Minecraft/.minecraft/screenshots")
for _, path := range [2]string{"~/.var/app/com.mojang.Minecraft/.minecraft/screenshots", "~/.var/app/com.mojang.Minecraft/data/minecraft/screenshots"} {
getScreenshotsFromPath(&minecraftFlatpak, path)
}
result = append(result, minecraftFlatpak)
} else if runtime.GOOS == "windows" {
getScreenshotsFromPath(&minecraftStandalone, filepath.Join(os.Getenv("APPDATA"), ".minecraft/screenshots"))