From b98a6a47aecb7d44da38b88441fc1170d7b3d79d Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Thu, 16 Nov 2023 18:55:15 +0000 Subject: [PATCH] Add Flatpak and Snap Steam Paths Also use mkdir -p in build.sh --- build.sh | 2 +- main.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 5e3c627..1db94ef 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ ## TODO: in future, provide other options for LevelDB -mkdir build +mkdir -p build g++ main.cpp -o build/dumpsteamcollections -std=c++20 -lleveldb -O2 strip build/dumpsteamcollections diff --git a/main.cpp b/main.cpp index ec73fd2..86d6ce2 100644 --- a/main.cpp +++ b/main.cpp @@ -20,11 +20,13 @@ std::string get_steam_install_path() { const std::string home = getenv("HOME"); // Possible paths where Steam for Linux may be installed - const std::string potential_steam_paths[4] = { + const std::string potential_steam_paths[6] = { home + "/.local/share/Steam", home + "/.steam/root", home + "/.steam/steam", - home + "/.steam/debian-installation" + home + "/.steam/debian-installation", // Mainly newer Ubuntu, Linux Mint, and Pop!_OS + home + "/.var/app/com.valvesoftware.Steam/data/Steam", // Flatpak Steam + home + "/snap/steam/common/.steam/root", // Steam Snap }; std::string found_steam_path;