mirror of https://github.com/aria2/aria2
parent
4b6f4040ac
commit
04caefa406
|
@ -186,11 +186,15 @@ error_code::Value option_processing(Option& op, bool standalone,
|
||||||
bool noConf = false;
|
bool noConf = false;
|
||||||
std::string ucfname;
|
std::string ucfname;
|
||||||
std::stringstream cmdstream;
|
std::stringstream cmdstream;
|
||||||
oparser->parseArg(cmdstream, uris, argc, argv);
|
|
||||||
{
|
{
|
||||||
// first evaluate --no-conf and --conf-path options.
|
// first evaluate --no-conf and --conf-path options.
|
||||||
Option op;
|
Option op;
|
||||||
|
if(argc == 0) {
|
||||||
|
oparser->parse(op, options);
|
||||||
|
} else {
|
||||||
|
oparser->parseArg(cmdstream, uris, argc, argv);
|
||||||
oparser->parse(op, cmdstream);
|
oparser->parse(op, cmdstream);
|
||||||
|
}
|
||||||
noConf = op.getAsBool(PREF_NO_CONF);
|
noConf = op.getAsBool(PREF_NO_CONF);
|
||||||
ucfname = op.get(PREF_CONF_PATH);
|
ucfname = op.get(PREF_CONF_PATH);
|
||||||
if(standalone) {
|
if(standalone) {
|
||||||
|
|
|
@ -32,7 +32,7 @@ public:
|
||||||
void setUp()
|
void setUp()
|
||||||
{
|
{
|
||||||
SessionConfig config;
|
SessionConfig config;
|
||||||
KeyVals options;
|
KeyVals options = {{"no-conf", "true"}};
|
||||||
session_ = sessionNew(options, config);
|
session_ = sessionNew(options, config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue