fix: read installed depots from completed manifest names too

This commit is contained in:
Kurt Himebauch committed 2026-11-03 14:54:33 -05:00
1 parent be5f1560b2
commit 0cc187025f
5 files changed
+43 -4

No files matched your search

@@ -137,10 +137,13 @@ object SteamLibraries {
val managed = AddedGames.steamInstallDirs(common)
return common.listFiles { f ->
f.isDirectory && f.name.lowercase() !in managed &&
File(f, ".download_complete").isFile && File(f, ".DepotDownloader/depot.config").isFile
File(f, ".download_complete").isFile && depotRecord(File(f, ".DepotDownloader"))
}.orEmpty().sortedBy { it.name.lowercase() }
}
private fun depotRecord(dir: File): Boolean = File(dir, "depot.config").isFile ||
File(dir, "completed").list()?.any { it.matches(Regex("\\d+_\\d+\\.manifest")) } == true
fun rename(context: Context, id: String, label: String) {
val name = clean(label).takeIf { it.isNotEmpty() } ?: return
synchronized(lock) { save(context, list(context).map { if (it.id == id) Entry(it.id, it.path, name) else it }) }