Skip to content

Commit 2f0382c

Browse files
committed
Opt: abspath in appdir of uiautomator2 cache
1 parent 7ff3e98 commit 2f0382c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

deploy/patch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def patch_uiautomator2():
6060
So we patch `uiautomator2/init.py` to a local assets cache `uiautomator2cache/cache`.
6161
appdir = os.path.join(os.path.expanduser('~'), '.uiautomator2')
6262
to:
63-
appdir = os.path.join(__file__, '../../uiautomator2cache')
63+
appdir = os.path.abspath(os.path.join(__file__, '../../uiautomator2cache'))
6464
6565
And we also remove minicap installations since emulators doesn't need it.
6666
for url in self.minicap_urls:
@@ -71,7 +71,7 @@ def patch_uiautomator2():
7171
"""
7272
cache_dir = './toolkit/Lib/site-packages/uiautomator2cache/cache'
7373
init_file = './toolkit/Lib/site-packages/uiautomator2/init.py'
74-
appdir = "os.path.join(__file__, '../../uiautomator2cache')"
74+
appdir = "os.path.abspath(os.path.join(__file__, '../../uiautomator2cache'))"
7575

7676
if not os.path.exists(init_file):
7777
logger.info('uiautomator2 is not installed skip patching')

0 commit comments

Comments
 (0)