summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostyantyn Ovechko <fastinetserver@gmail.com>2010-07-23 16:38:06 +0300
committerKostyantyn Ovechko <fastinetserver@gmail.com>2010-07-23 17:06:01 +0300
commite73ca6a0e7b62add68cee0e258bb46d15c4741aa (patch)
tree6893dcc43d32ed97bc27cda322f5ae6c6f5dd3ac /segget/config.cpp
parentAdd daemon mode to segget (diff)
downloadidfetch-e73ca6a0e7b62add68cee0e258bb46d15c4741aa.tar.gz
idfetch-e73ca6a0e7b62add68cee0e258bb46d15c4741aa.tar.bz2
idfetch-e73ca6a0e7b62add68cee0e258bb46d15c4741aa.zip
Add command line arguments: --no-daemon and --conf-dir=specify_conf_dir_here
Arguments are optional. If no arguments provided, segget will run in a daemon mode and use /etc/seggetd dir to read configuration files.
Diffstat (limited to 'segget/config.cpp')
-rw-r--r--segget/config.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/segget/config.cpp b/segget/config.cpp
index 6c926df..fbbbab0 100644
--- a/segget/config.cpp
+++ b/segget/config.cpp
@@ -31,10 +31,10 @@ void Tconfig::load_settings_from_config_file(){
ifstream file;
file.exceptions (ifstream::failbit | ifstream::badbit);
try{
- file.open(config_file_name.c_str());
+ file.open((settings.conf_dir+"/"+config_file_name).c_str());
}
catch(...){
- error_log("Error opening settings file: "+config_file_name+". Default settings will be used. Check if config file: "+config_file_name+" exists and segget has rights to access it.");
+ error_log("Error opening settings file: "+settings.conf_dir+"/"+config_file_name+". Default settings will be used. Check if config file: "+config_file_name+" exists and segget has rights to access it.");
return;
}
try{