Fix ren dir\source target (we stayed in dir instead of returning).
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3545
This commit is contained in:
parent
d42127638b
commit
be08175077
1 changed files with 3 additions and 2 deletions
|
@ -248,8 +248,9 @@ void DOS_Shell::CMD_RENAME(char * args){
|
|||
if((strlen(dir_source) == 2) && (dir_source[1] == ':'))
|
||||
strcat(dir_source,"\\"); //X: add slash
|
||||
|
||||
char dir_current[DOS_PATHLENGTH];
|
||||
DOS_GetCurrentDir(0,dir_current);
|
||||
char dir_current[DOS_PATHLENGTH + 1];
|
||||
dir_current[0] = '\\'; //Absolute addressing so we can return properly
|
||||
DOS_GetCurrentDir(0,dir_current + 1);
|
||||
if(!DOS_ChangeDir(dir_source)) {
|
||||
WriteOut(MSG_Get("SHELL_ILLEGAL_PATH"));
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue