mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2025-02-02 05:52:31 +01:00
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:
parent
9804215de8
commit
cae5f80698
3
main.cpp
3
main.cpp
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user