Account for older(?) versions of Steam

This commit is contained in:
Evil Eye 2025-08-27 20:21:35 +02:00
parent 8bca76a23d
commit 75034021fa

View File

@ -111,11 +111,13 @@ namespace Files
std::filesystem::path wine = Wine::getInstallPath(homePath); std::filesystem::path wine = Wine::getInstallPath(homePath);
if (!wine.empty()) if (!wine.empty())
paths.emplace_back(std::move(wine)); paths.emplace_back(std::move(wine));
constexpr std::string_view steamPath = ".local/share/Steam/steamapps/common/Morrowind";
std::array steamPaths{ std::array steamPaths{
homePath / steamPath, // Default // Default (~/.steam/steam can be a symlink or a real directory)
homePath / "snap/steam/common" / steamPath, // Snap homePath / ".steam/steam/steamapps/common/Morrowind",
homePath / ".var/app/com.valvesoftware.Steam" / steamPath, // Flatpak // Snap
homePath / "snap/steam/common/.local/share/Steam/steamapps/common/Morrowind",
// Flatpak
homePath / ".var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Morrowind",
}; };
for (std::filesystem::path steam : steamPaths) for (std::filesystem::path steam : steamPaths)
{ {