mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:35:41 +00:00
set right errorlevel for cd / chdir, left to do we do not have /d param that are new in win2k maby in older windows also
svn path=/trunk/; revision=16463
This commit is contained in:
parent
721be9ec7b
commit
7ee590086a
1 changed files with 12 additions and 6 deletions
|
@ -172,6 +172,8 @@ INT cmd_chdir (LPTSTR cmd, LPTSTR param)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nErrorLevel = 0;
|
||||||
|
|
||||||
/* The whole param string is our parameter these days. The only thing we do is eliminating every quotation mark */
|
/* The whole param string is our parameter these days. The only thing we do is eliminating every quotation mark */
|
||||||
/* Is it safe to change the characters param is pointing to? I presume it is, as there doesn't seem to be any
|
/* Is it safe to change the characters param is pointing to? I presume it is, as there doesn't seem to be any
|
||||||
post-processing of it after the function call (what would that accomplish?) */
|
post-processing of it after the function call (what would that accomplish?) */
|
||||||
|
@ -263,6 +265,7 @@ INT cmd_chdir (LPTSTR cmd, LPTSTR param)
|
||||||
ConOutFormatMessage(GetLastError());
|
ConOutFormatMessage(GetLastError());
|
||||||
free (lpOldPath);
|
free (lpOldPath);
|
||||||
lpOldPath = NULL;
|
lpOldPath = NULL;
|
||||||
|
nErrorLevel = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,6 +285,7 @@ INT cmd_chdir (LPTSTR cmd, LPTSTR param)
|
||||||
ConOutFormatMessage(GetLastError());
|
ConOutFormatMessage(GetLastError());
|
||||||
free (lpOldPath);
|
free (lpOldPath);
|
||||||
lpOldPath = NULL;
|
lpOldPath = NULL;
|
||||||
|
nErrorLevel = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,6 +297,7 @@ INT cmd_chdir (LPTSTR cmd, LPTSTR param)
|
||||||
{
|
{
|
||||||
FindClose(hSearch);
|
FindClose(hSearch);
|
||||||
ConOutFormatMessage(GetLastError());
|
ConOutFormatMessage(GetLastError());
|
||||||
|
nErrorLevel = 1;
|
||||||
free (lpOldPath);
|
free (lpOldPath);
|
||||||
lpOldPath = NULL;
|
lpOldPath = NULL;
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -301,6 +306,7 @@ INT cmd_chdir (LPTSTR cmd, LPTSTR param)
|
||||||
|
|
||||||
//ErrorMessage (GetLastError(), _T("CD"));
|
//ErrorMessage (GetLastError(), _T("CD"));
|
||||||
ConOutFormatMessage(GetLastError());
|
ConOutFormatMessage(GetLastError());
|
||||||
|
nErrorLevel = 1;
|
||||||
|
|
||||||
/* throw away current directory */
|
/* throw away current directory */
|
||||||
free (lpOldPath);
|
free (lpOldPath);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue