handle %dp0

svn path=/trunk/; revision=32069
This commit is contained in:
Christoph von Wittich 2008-01-31 19:01:23 +00:00
parent 11ca34b0e3
commit 97b5e11eba

View file

@ -1293,6 +1293,18 @@ GetParsedEnvVar ( LPCTSTR varName, UINT* varNameLen, BOOL ModeSetA )
return NULL;
switch ( *varName )
{
case _T('~'):
varName++;
if (_tcsncicmp(varName, _T("dp0"), 3) == 0)
{
if ( varNameLen )
*varNameLen = 4;
varName += 2;
if ( !GrowIfNecessary ( MAX_PATH, &ret, &retlen ) )
return NULL;
GetCurrentDirectory(MAX_PATH, ret);
}
return ret;
case _T('0'):
case _T('1'):
case _T('2'):
@ -1411,7 +1423,7 @@ ProcessInput (BOOL bFlag)
LPCTSTR tmp;
BOOL bEchoThisLine;
BOOL bModeSetA;
BOOL bIsBatch;
BOOL bIsBatch;
do
{