From 1fdd8978a4f117d4eb5fb5e8bd543589e03672f7 Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Mon, 25 Aug 2025 22:18:42 +0200 Subject: [PATCH] Detect more Steam versions --- components/files/linuxpath.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/components/files/linuxpath.cpp b/components/files/linuxpath.cpp index e4e01ce184..c5aa705c75 100644 --- a/components/files/linuxpath.cpp +++ b/components/files/linuxpath.cpp @@ -2,6 +2,7 @@ #if defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) +#include #include #include #include @@ -110,9 +111,17 @@ namespace Files std::filesystem::path wine = Wine::getInstallPath(homePath); if (!wine.empty()) paths.emplace_back(std::move(wine)); - std::filesystem::path steam = homePath / ".local/share/Steam/steamapps/common/Morrowind"; - if (std::filesystem::is_directory(steam)) - paths.emplace_back(std::move(steam)); + constexpr std::string_view steamPath = ".local/share/Steam/steamapps/common/Morrowind"; + std::array steamPaths{ + homePath / steamPath, // Default + homePath / "snap/steam/common" / steamPath, // Snap + homePath / ".var/app/com.valvesoftware.Steam" / steamPath, // Flatpak + }; + for (std::filesystem::path steam : steamPaths) + { + if (std::filesystem::is_directory(steam)) + paths.emplace_back(std::move(steam)); + } } return paths; }