aboutsummaryrefslogtreecommitdiffstats
path: root/uiautomatorviewer/etc
diff options
context:
space:
mode:
authorRaphael Moll <ralf@android.com>2012-11-27 08:49:18 -0800
committerRaphael Moll <ralf@android.com>2012-11-27 08:49:38 -0800
commitbcc08a693d356074b53b0c16ae56163e46cef38d (patch)
tree386cb1bd7517182addd1030a96affc0210932178 /uiautomatorviewer/etc
parenta11db8550ad916cf18fadb3591b3e12bf96674fb (diff)
downloadsdk-bcc08a693d356074b53b0c16ae56163e46cef38d.zip
sdk-bcc08a693d356074b53b0c16ae56163e46cef38d.tar.gz
sdk-bcc08a693d356074b53b0c16ae56163e46cef38d.tar.bz2
Fix uiautomaterviewer.bat on Windows.
SDK Bug: 40495 Change-Id: I54d14d2795322e17e72dbd015f4e37e6dd91a27a
Diffstat (limited to 'uiautomatorviewer/etc')
-rwxr-xr-xuiautomatorviewer/etc/uiautomatorviewer.bat5
1 files changed, 4 insertions, 1 deletions
diff --git a/uiautomatorviewer/etc/uiautomatorviewer.bat b/uiautomatorviewer/etc/uiautomatorviewer.bat
index 28bc44e..f3f5d47 100755
--- a/uiautomatorviewer/etc/uiautomatorviewer.bat
+++ b/uiautomatorviewer/etc/uiautomatorviewer.bat
@@ -24,6 +24,9 @@ rem Change current directory and drive to where the script is, to avoid
rem issues with directories containing whitespaces.
cd /d %~dp0
+rem Get the CWD as a full path with short names only (without spaces)
+for %%i in ("%cd%") do set prog_dir=%%~fsi
+
rem Check we have a valid Java.exe in the path.
set java_exe=
call lib\find_java.bat
@@ -60,4 +63,4 @@ if exist %swt_path% goto SetPath
:SetPath
set javaextdirs=%swt_path%;%frameworkdir%
-call %java_exe% -Djava.ext.dirs=%javaextdirs% -Dcom.android.uiautomator.bindir= -jar %jarpath% %*
+call %java_exe% -Djava.ext.dirs=%javaextdirs% -Dcom.android.uiautomator.bindir=%prog_dir% -jar %jarpath% %*