Changed: Make absolute program path (useful if launched from current directory under Linux)

Changed: Set process name for logs
This commit is contained in:
kervala 2016-01-23 18:50:17 +01:00
parent be0355c570
commit c0fb23c007

View file

@ -262,7 +262,10 @@ bool CCmdArgs::parse(const std::vector<std::string> &argv)
// first argument is always the program name // first argument is always the program name
_ProgramName = CFile::getFilename(argv.front()); _ProgramName = CFile::getFilename(argv.front());
_ProgramPath = CPath::standardizePath(CFile::getPath(argv.front())); _ProgramPath = CPath::makePathAbsolute(CPath::standardizePath(CFile::getPath(argv.front())), CPath::getCurrentPath(), true);
// set process name for logs
CLog::setProcessName(_ProgramName);
// arguments count // arguments count
uint argc = argv.size(); uint argc = argv.size();