diff --git a/stepmania/PBProject/Installer/Processor.cpp b/stepmania/PBProject/Installer/Processor.cpp index 4ee8f0c0f3..69109b86a4 100644 --- a/stepmania/PBProject/Installer/Processor.cpp +++ b/stepmania/PBProject/Installer/Processor.cpp @@ -12,6 +12,7 @@ using namespace std; #include #include #include +#include #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; diff --git a/stepmania/PBProject/Installer/Processor.h b/stepmania/PBProject/Installer/Processor.h index b6c9889180..b4408ea4e8 100644 --- a/stepmania/PBProject/Installer/Processor.h +++ b/stepmania/PBProject/Installer/Processor.h @@ -42,9 +42,7 @@ private: bool ResolveConditional(const CString& cond); static void DefaultError(const char *fmt, ...); public: - Processor(CString& path, handleFileFunc f, getPathFunc p, askFunc a, bool i) - : mDoGoto(false), mPath(path), mCWD("."), mHandleFile(f), mGetPath(p), mAsk(a), - mError(Processor::DefaultError), mInstalling(i) { mConditionals["INSTALLING"] = i; } + Processor(CString& path, handleFileFunc f, getPathFunc p, askFunc a, bool i); void ProcessLine(const CString& line, unsigned& nextLine); void SetErrorFunc(errorFunc f) { mError = f; } };