Use current directory if directory wasn't specified

This commit is contained in:
Sude 2014-09-19 23:07:16 +03:00
parent 5635909e20
commit 5f7d04334f

View File

@ -325,8 +325,14 @@ int main(int argc, char *argv[])
// Make sure that directory has trailing slash
if (!config.sDirectory.empty())
{
if (config.sDirectory.at(config.sDirectory.length()-1)!='/')
config.sDirectory += "/";
}
else
{
config.sDirectory = "./"; // Directory wasn't specified, use current directory
}
if (!unrecognized_options_cfg.empty() && (!config.bSaveConfig || !config.bResetConfig))
{