fix: find Steam libraries whose installs have no appmanifest

This commit is contained in:
Kurt Himebauch committed 2026-11-03 14:39:45 -05:00
1 parent 9f6c73442b
commit be5f1560b2
3 files changed
+50 -2

No files matched your search

@@ -186,6 +186,9 @@ object AddedGames {
private fun entryFolders(context: Context): Set<String> = AddedExes.list(context).map { it.folder }.toSet()
private fun libraryDepotInstalls(context: Context): List<File> =
SteamLibraries.list(context).flatMap { SteamLibraries.depotInstalls(File(it.path, "steamapps/common")) }
internal fun isSteamLibraryFolder(name: String): Boolean =
name.equals("steamapps", ignoreCase = true) || name == com.droiddeck.launcher.session.GameStorage.X64_CARD_DIR
@@ -213,6 +216,7 @@ object AddedGames {
if (folder.path in removed || !folder.isDirectory) continue
scanGame(context, folder, out, single = entry)
}
for (folder in libraryDepotInstalls(context)) if (folder.path !in removed) scanGame(context, folder, out)
for (folder in StoreInstallRoot.gameFolders(context)) if (StoreInstallRoot.isFinished(folder)) scanGame(context, folder, out)
for (game in com.droiddeck.launcher.runtime.BattleNet.games(context)) {
if (game.folder.path !in removed) com.droiddeck.launcher.runtime.BattleNet.shortcut(context, game)?.let(out::add)
@@ -259,6 +263,7 @@ object AddedGames {
entries.map { File(it.folder) }.filter(::owns).maxByOrNull { canonical(it).length }?.let { return it }
SessionPrefs.removedAddedGames(context).map { File(it) }.filter { owns(it) && groupGames(it) == null }.maxByOrNull { canonical(it).length }?.let { return it }
StoreInstallRoot.gameFolders(context).firstOrNull(::holds)?.let { return it }
libraryDepotInstalls(context).firstOrNull(::holds)?.let { return it }
val removed = SessionPrefs.removedAddedGames(context)
val dirs = listOfNotNull(
GameStorage.effective(context)?.let { File(it.path, "steamapps/common") },
@@ -376,6 +381,7 @@ object AddedGames {
}
AddedExes.list(context).filter { it.folder !in removed }.forEach { out.add(canonical(File(it.folder))) }
StoreInstallRoot.gameFolders(context).forEach { out.add(canonical(it)) }
libraryDepotInstalls(context).filter { it.path !in removed }.forEach { out.add(canonical(it)) }
return out
}