mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 12:28:40 +00:00
fix(library): persist explicitly selected executables in discovered folders (#2703)
* fix(library): persist explicitly selected executables in discovered folders * fix(library): keep reachable executable when selecting unmapped alias
This commit is contained in:
1 parent
aba9811357
commit
8e514ada62
2 files changed
+35
-2
No files matched your search
@@ -335,7 +335,10 @@ object AddedGames {
|
||||
val path = canonical(exe)
|
||||
val owner = ownerFolder(app, exe)
|
||||
if (owner != null && owner.path !in SessionPrefs.removedAddedGames(app)) {
|
||||
single(app, owner.path)?.takeIf { canonical(it.exe) == path }?.let { return AddResult.Existing(it) }
|
||||
single(app, owner.path)?.takeIf { canonical(it.exe) == path }?.let {
|
||||
if (guestPath(app, exe) != null) AddedExes.put(app, AddedExes.Entry(owner.path, exe.path))
|
||||
return AddResult.Existing(it)
|
||||
}
|
||||
}
|
||||
if (guestPath(app, exe) == null) {
|
||||
(owner ?: exe.parentFile)?.takeIf { guestPath(app, it) == null }?.let { bindFolder(app, it) }
|
||||
@@ -344,7 +347,7 @@ object AddedGames {
|
||||
val folder = owner ?: exe.parentFile ?: return AddResult.NotFound
|
||||
SessionPrefs.setAddedGameRemoved(app, folder.path, false)
|
||||
SessionPrefs.setAddedGameExe(app, folder.path, exe.path)
|
||||
if (owner == null) AddedExes.put(app, AddedExes.Entry(folder.path, exe.path))
|
||||
AddedExes.put(app, AddedExes.Entry(folder.path, exe.path))
|
||||
val game = single(app, folder.path) ?: return AddResult.NotFound
|
||||
AddedGamesPublisher.later(app) { com.droiddeck.launcher.stores.SteamLiveShortcuts.sync(app, listOf(game)) { true } }
|
||||
Log.i(TAG, "added ${game.name} from its exe")
|
||||
|
||||
Reference in new issue
Block a user