From cd346498a2e9a16a48e55b21ec46e1d08f677c7d Mon Sep 17 00:00:00 2001 From: 0neGal Date: Tue, 22 Mar 2022 23:44:59 +0100 Subject: added support for VDF flatpak reading Flatpak Steam has it's libraryfolders.vdf in a different location. This checks should make it check for both. --- src/extras/findgame.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/extras/findgame.js b/src/extras/findgame.js index cfcb7aa..924c96f 100644 --- a/src/extras/findgame.js +++ b/src/extras/findgame.js @@ -55,7 +55,17 @@ module.exports = async () => { case "linux": case "openbsd": case "freebsd": - folder = path.join(app.getPath("home"), "/.steam/steam/steamapps/libraryfolders.vdf"); + let paths = [ + "/.steam/steam/steamapps/libraryfolders.vdf", + ".var/app/com.valvesoftware.Steam/.steam/steam/steamapps/libraryfolders.vdf" + ] + + for (let i = 0; i < paths.length; i++) { + if (fs.existsSync(path.join(app.getPath("home"), paths[i]))) { + folder = path.join(app.getPath("home"), paths[i]); + continue + } + } break } -- cgit v1.2.3