Loading config from default path

This commit is contained in:
Tomasz Drwięga 2016-12-16 15:03:31 +01:00
parent 3450538208
commit f345458b65

View File

@ -145,7 +145,7 @@ macro_rules! usage {
} }
let config_file = raw_args.flag_config.clone().unwrap_or_else(|| raw_args.clone().into_args(Config::default()).flag_config); let config_file = raw_args.flag_config.clone().unwrap_or_else(|| raw_args.clone().into_args(Config::default()).flag_config);
let config_file = replace_home("", &config_file); let config_file = replace_home(&::dir::default_data_path(), &config_file);
let config = match (fs::File::open(&config_file), raw_args.flag_config.is_some()) { let config = match (fs::File::open(&config_file), raw_args.flag_config.is_some()) {
// Load config file // Load config file
(Ok(mut file), _) => { (Ok(mut file), _) => {