OSDN Git Service

Fix android.bat to support CWD with & character
authorRaphael Moll <ralf@android.com>
Mon, 31 Jan 2011 23:03:37 +0000 (15:03 -0800)
committerRaphael Moll <ralf@android.com>
Mon, 31 Jan 2011 23:03:37 +0000 (15:03 -0800)
SDK Bug: 12862

Change-Id: Ib9508ce384b91a234e33834b19aaff6cc77e8ade

sdkmanager/app/etc/android.bat

index 6dffb36..03fc031 100755 (executable)
@@ -25,7 +25,7 @@ rem and set up progdir to be the fully-qualified pathname of its directory.
 set prog=%~f0\r
 \r
 rem Grab current directory before we change it\r
-set work_dir=%cd%\r
+set work_dir="%cd%"\r
 \r
 rem Change current directory and drive to where the script is, to avoid\r
 rem issues with directories containing whitespaces.\r
@@ -76,6 +76,6 @@ if exist %swt_path% goto SetPath
 \r
 :SetPath\r
 rem Finally exec the java program and end here.\r
-call %java_exe% -Dcom.android.sdkmanager.toolsdir="%tools_dir%" -Dcom.android.sdkmanager.workdir="%work_dir%" -classpath "%jar_path%;%swt_path%\swt.jar" com.android.sdkmanager.Main %*\r
+call %java_exe% -Dcom.android.sdkmanager.toolsdir="%tools_dir%" -Dcom.android.sdkmanager.workdir=%work_dir% -classpath "%jar_path%;%swt_path%\swt.jar" com.android.sdkmanager.Main %*\r
 \r
 rem EOF\r