Allow saving empty option values to config

Fixes issues caused by boost program options overriding desired value with default value because it wasn't found in config file.

For example using --subdir-extras "" --save-config would erase subdir-extras from config file.
Trying to download something would then cause the downloader to use default value for subdir-extras because it wasn't found in config.
This commit is contained in:
Sude 2018-08-23 21:30:24 +03:00
parent 9804215de8
commit cae5f80698

View File

@ -660,11 +660,8 @@ int main(int argc, char *argv[])
continue;
}
if (!option_value_string.empty())
{
ofs << option << " = " << option_value_string << std::endl;
}
}
ofs.close();
if (!Globals::globalConfig.bRespectUmask)
Util::setFilePermissions(Globals::globalConfig.sConfigFilePath, boost::filesystem::owner_read | boost::filesystem::owner_write);