diff --git a/include/shell.h b/include/shell.h index b6799bee..7bce84df 100644 --- a/include/shell.h +++ b/include/shell.h @@ -44,7 +44,7 @@ class DOS_Shell; class BatchFile { public: - BatchFile(DOS_Shell * host,char const* const name, char const * const cmd_line); + BatchFile(DOS_Shell * host,char const* const resolved_name,char const* const entered_name, char const * const cmd_line); virtual ~BatchFile(); virtual bool ReadLine(char * line); bool Goto(char * where); diff --git a/src/shell/shell_batch.cpp b/src/shell/shell_batch.cpp index 3d4c1668..821d188f 100644 --- a/src/shell/shell_batch.cpp +++ b/src/shell/shell_batch.cpp @@ -24,14 +24,14 @@ #include "shell.h" #include "support.h" -BatchFile::BatchFile(DOS_Shell * host,char const * const name, char const * const cmd_line) { +BatchFile::BatchFile(DOS_Shell * host,char const * const resolved_name,char const * const entered_name, char const * const cmd_line) { location = 0; prev=host->bf; echo=host->echo; shell=host; char totalname[DOS_PATHLENGTH+4]; - DOS_Canonicalize(name,totalname); // Get fullname including drive specificiation - cmd = new CommandLine(totalname,cmd_line); + DOS_Canonicalize(resolved_name,totalname); // Get fullname including drive specificiation + cmd = new CommandLine(entered_name,cmd_line); filename = totalname; //Test if file is openable diff --git a/src/shell/shell_misc.cpp b/src/shell/shell_misc.cpp index 0f51905f..2b5056af 100644 --- a/src/shell/shell_misc.cpp +++ b/src/shell/shell_misc.cpp @@ -431,7 +431,7 @@ bool DOS_Shell::Execute(char * name,char * args) { /* delete old batch file if call is not active*/ bool temp_echo=echo; /*keep the current echostate (as delete bf might change it )*/ if(bf && !call) delete bf; - bf=new BatchFile(this,fullname,line); + bf=new BatchFile(this,fullname,name,line); echo=temp_echo; //restore it. } else