mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 13:26:02 +00:00
fix: games on an SD card install faster and Battle.net can read the card's volume (#2379)
A Battle.net library on another volume is reached through its own drive letter, so the Agent's volume query succeeds. The proot fast path keeps folder handles for FUSE-backed libraries. Supersedes #2377.
This commit is contained in:
1 parent
1d247d212b
commit
3b6d13a8d7
6 files changed
+883
-36
No files matched your search
@@ -259,6 +259,29 @@ class BattleNetTest {
|
||||
BattleNet.hostFolder(context, "Z:/root/Games/Stores/Battle.net/Hearthstone/"))
|
||||
}
|
||||
|
||||
@Test fun aMappedWineDriveResolvesThroughItsLink() {
|
||||
val devices = File(BattleNet.prefix(context), "pfx/dosdevices").apply { mkdirs() }
|
||||
java.nio.file.Files.createSymbolicLink(File(devices, "d:").toPath(), java.nio.file.Paths.get("/root/Games/Card"))
|
||||
java.nio.file.Files.createSymbolicLink(File(devices, "e:").toPath(), java.nio.file.Paths.get("../drive_c"))
|
||||
assertEquals(File(LinuxRuntime.rootDir(context), "root/Games/Card/Battle.net/Hearthstone"),
|
||||
BattleNet.hostFolder(context, "D:\\Battle.net\\Hearthstone"))
|
||||
assertEquals(File(BattleNet.prefix(context), "pfx/drive_c/Games/X"), BattleNet.hostFolder(context, "E:\\Games\\X"))
|
||||
assertNull(BattleNet.hostFolder(context, "F:\\Games\\X"))
|
||||
assertNull(BattleNet.hostFolder(context, "D:\\..\\etc"))
|
||||
}
|
||||
|
||||
@Test fun aDriveLinkTheNativeUserlandMadeRelativeStillResolvesInTheGuest() {
|
||||
val root = LinuxRuntime.rootDir(context)
|
||||
val devices = File(BattleNet.prefix(context), "pfx/dosdevices").apply { mkdirs() }
|
||||
java.nio.file.Files.createSymbolicLink(File(devices, "d:").toPath(), java.nio.file.Paths.get("/root/Games/Card"))
|
||||
java.nio.file.Files.createSymbolicLink(File(devices, "g:").toPath(), java.nio.file.Paths.get("../../../../../../../../../../.."))
|
||||
NativeGuest.relinkAbsoluteSymlinks(context, root)
|
||||
assertFalse(java.nio.file.Files.readSymbolicLink(File(devices, "d:").toPath()).isAbsolute)
|
||||
assertEquals(File(root, "root/Games/Card/Battle.net/Hearthstone"),
|
||||
BattleNet.hostFolder(context, "D:\\Battle.net\\Hearthstone"))
|
||||
assertNull(BattleNet.hostFolder(context, "G:\\etc\\passwd"))
|
||||
}
|
||||
|
||||
|
||||
@Test fun wowForeverIsListedBesideRetailInTheSharedWorldOfWarcraftFolder() {
|
||||
val pfx = File(BattleNet.prefix(context), "pfx").apply { mkdirs() }
|
||||
|
||||
Reference in new issue
Block a user