mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-07 06:39:23 +00:00
* Expand ~ in paths, all uses should be covered.
* Moved option file parsing to VariableMap and added "import" and "try_import" options for loading option files. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@636 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+2
-5
@@ -68,7 +68,6 @@
|
||||
#include "control.h"
|
||||
#include "globals.h"
|
||||
#include "signal_handler.h"
|
||||
#include "option_file.h"
|
||||
#include "option_handler_rules.h"
|
||||
#include "option_parser.h"
|
||||
#include "command_scheduler.h"
|
||||
@@ -166,10 +165,8 @@ main(int argc, char** argv) {
|
||||
|
||||
control->core()->initialize_first();
|
||||
|
||||
OptionFile optionFile;
|
||||
optionFile.slot_option(sigc::mem_fun(control->variables(), &utils::VariableMap::process_command));
|
||||
|
||||
if (getenv("HOME") && !optionFile.process_file(getenv("HOME") + std::string("/.rtorrent.rc")))
|
||||
// Move env and go through "try_import".
|
||||
if (!control->variables()->process_file("~/.rtorrent.rc"))
|
||||
control->core()->get_log_important().push_front("Could not load \"~/.rtorrent.rc\".");
|
||||
|
||||
int firstArg = parse_options(control, control->variables(), argc, argv);
|
||||
|
||||
Reference in New Issue
Block a user