mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 04:55:44 +00:00
fix(stores): keep host paths on Z: when the Bionic path lookup fails
This commit is contained in:
1 parent
2def4735fc
commit
0438887e91
2 files changed
+5
-1
No files matched your search
@@ -158,7 +158,9 @@ def ask(channel, request, timeout=TIMEOUT, claim=False):
|
||||
|
||||
def windows_path(unix):
|
||||
tool = bionic_tool(os.environ.get("DD_STORE_PROTON", ""))
|
||||
return (tool and bionic_path(tool, unix)) or "Z:" + guest_path(unix).replace("/", "\\")
|
||||
if tool:
|
||||
return bionic_path(tool, unix) or "Z:" + unix.replace("/", "\\")
|
||||
return "Z:" + guest_path(unix).replace("/", "\\")
|
||||
|
||||
|
||||
def guest_path(unix):
|
||||
|
||||
@@ -190,6 +190,8 @@ class StorePaths(unittest.TestCase):
|
||||
(self.tool / 'proton').write_text('#!/bin/sh\nexit 1\n')
|
||||
with self.env():
|
||||
self.assertEqual('Z:\\home\\games\\c.reg', store.windows_path('/home/games/c.reg'))
|
||||
self.assertEqual('Z:\\data\\user\\0\\com.droiddeck.launcher\\files\\linuxfs\\tmp\\c.reg',
|
||||
store.windows_path(ANDROID + '/tmp/c.reg'))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in new issue
Block a user