Test for a hardcoded relative datadir path.

When the path is hardcoded it should also test for relative paths. Based
on a patch by crimson_penguin.
This commit is contained in:
Mark de Wever 2008-11-22 22:28:33 +00:00
parent f3aca6d9ad
commit f30fde6150

View file

@ -256,6 +256,12 @@ game_controller::game_controller(int argc, char** argv) :
{
bool no_music = false;
bool no_sound = false;
// The path can be hardcoded and it might be a relative path.
if(!game_config::path.empty() && game_config::path[0] != '/') {
game_config::path = get_cwd() + '/' + game_config::path;
}
for(arg_ = 1; arg_ != argc_; ++arg_) {
const std::string val(argv_[arg_]);
if(val.empty()) {