Keep mCWD as an absolute path.

This commit is contained in:
Steve Checkoway
2003-09-10 03:26:12 +00:00
parent 04c7707c16
commit 010f353817
2 changed files with 13 additions and 3 deletions
@@ -12,6 +12,7 @@ using namespace std;
#include <vector>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/param.h>
#include "StdString.h"
#include "Processor.h"
@@ -42,6 +43,17 @@ CString StripVar(const CString& var)
return var.substr(1, var.npos);
}
Processor::Processor(CString& path, handleFileFunc f, getPathFunc p, askFunc a, bool i)
: mDoGoto(false), mPath(path), mHandleFile(f), mGetPath(p), mAsk(a),
mError(Processor::DefaultError), mInstalling(i)
{
char cwd[MAXPATHLEN];
getwd(cwd);
mCWD = cwd;
mConditionals["INSTALLING"] = i;
}
void Processor::ProcessLine(const CString& line, unsigned& nextLine)
{
CStringArray parts;