aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2022-03-22 23:44:59 +0100
committer0neGal <mail@0negal.com>2022-03-22 23:45:47 +0100
commitcd346498a2e9a16a48e55b21ec46e1d08f677c7d (patch)
tree1eacc69356a4a5880a6314b6e44f53315969b078
parent9573c62bf1dfde501af4bd92854adc335faca68b (diff)
downloadViper-cd346498a2e9a16a48e55b21ec46e1d08f677c7d.tar.gz
Viper-cd346498a2e9a16a48e55b21ec46e1d08f677c7d.zip
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.
-rw-r--r--src/extras/findgame.js12
1 files changed, 11 insertions, 1 deletions
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
}