WilliamVenner / steamlocate-rs

🎮 Rust Crate for locating Steam game installation directories (and Steam itself!)
MIT License
39 stars 15 forks source link

Fails to locate game on secondary drive #37

Open GeckoEidechse opened 1 year ago

GeckoEidechse commented 1 year ago

My application uses steamlocate-rs to find the install directory of Titanfall2 (1237970).

A user of my application on Fedora 38 noticed however that it was unable to locate their install of Titanfall2. On their setup they installed Steam via the native Fedora package.

As such their library folders are located in

~/.local/share/Steam/config/libraryfolders.vdf
~/.local/share/Steam/steamapps/libraryfolders.vdf

which (partially anonymised) looks like:

"libraryfolders"
{
    "0"
    {
        "path"        "/home/XXXXXXXXX/.local/share/Steam"
        "label"        ""
        "contentid"        "XXXXXXXXXXXXXXXXXXXX"
        "totalsize"        "0"
        "update_clean_bytes_tally"        "6504277467"
        "time_last_update_corruption"        "0"
        "apps"
        {
            "XXXXXXX"        "XXXXXXXXXX"
        }
    }
    "1"
    {
        "path"        "/mnt/0678788f-1ffe-4a12-8608-8ef3b8467106/SteamLibrary"
        "label"        ""
        "contentid"        "4113662200414089328"
        "totalsize"        "737229742080"
        "update_clean_bytes_tally"        "10119163182"
        "time_last_update_corruption"        "0"
        "apps"
        {
            "XXXXXXXXX"        "XXXXXXXXX"
            "1237970"        "68365272890"
            "XXXXXXXXX"        "XXXXXXXXX"
            "XXXXXXXXX"        "XXXXXXXXX"
        }
    }
}

Unfortunately I have not yet been able to figure out where the game detection fails (reading libraryfolders.vdf, accessing secondary drive, ...)

For detection I'm using the newest release of steamlocate, i.e. 1.2.1

CosmicHorrorDev commented 1 year ago

Can you reproduce on the 2.0.0-alpha.0 release? It's possible there is a value in their app manifest that fails to parse on the 1.2.1 release

GeckoEidechse commented 1 year ago

Aight, I'll try to push out a build with that version of the library over the next day or so and get them to test it to see if it solves it \^\^

GeckoEidechse commented 1 year ago

Ok, didn't get to push out a build yet but talking to the affect person again, it turns out they still had leftover files from a Flatpak install of Steam and steamlocate apparently was prioritising those and ignoring the other files?

Still trying to find out more about this...

GeckoEidechse commented 1 year ago

Yeah, so to confirm, removing the leftover Flatpak Steam files, fixed the issue for the affected person.

CosmicHorrorDev commented 1 year ago

Ah, forgot that was a thing. Looks like I'll have to dig into better determining if an installation is still active

mainrs commented 11 months ago

Maybe this is useful in some way. These seem to be the installation directories of Steam on various Linux distros:

https://github.com/lutris/lutris/blob/73ea627dca06e049dcbb57222932cb82227ea576/lutris/util/steam/config.py#L13C5-L25