[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdesupport/strigi/src/daemon
From: Jos van den Oever <jos () vandenoever ! info>
Date: 2008-01-13 20:52:08
Message-ID: 1200257528.388250.7215.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 760975 by vandenoever:
cleanup the configuration by separating out the configuration of the strigi dir and the home directory.
M +18 -9 daemonconfigurator.cpp
--- trunk/kdesupport/strigi/src/daemon/daemonconfigurator.cpp #760974:760975
@@ -46,7 +46,16 @@
};
DaemonConfigurator::DaemonConfigurator (const string& confFile)
- : m_confFile (confFile) {
+ : m_confFile (confFile) {
+ // find the strigi directory
+ string strigidir;
+ string::size_type slashpos = confFile.rfind('/');
+ if (slashpos != string::npos) {
+ strigidir = confFile.substr(0, slashpos);
+ } else {
+ strigidir = getenv("HOME") + string("/.strigi");
+ }
+
stringbuf xml;
ifstream f(confFile.c_str(), ios::binary);
f.get(xml, '\0');
@@ -66,19 +75,19 @@
a_useDBus = true;
Repository r;
r.a_name = "localhost";
- string s = getenv("HOME");
- r.a_indexdir = s + "/.strigi/clucene";
+ string home = getenv("HOME");
+ r.a_indexdir = strigidir + "/clucene";
r.a_writeable = true;
r.a_type = "clucene";
r.a_pollingInterval = DEFAULT_POLLING_INTERVAL;
Path p;
- p.a_path = s; r.e_path.push_back(p);
- p.a_path = s + "/.kde"; r.e_path.push_back(p);
- p.a_path = s + "/.gnome2"; r.e_path.push_back(p);
- p.a_path = s + "/.evolution"; r.e_path.push_back(p);
- p.a_path = s + "/.mozilla"; r.e_path.push_back(p);
- p.a_path = s + "/.mozilla-thunderbird"; r.e_path.push_back(p);
+ p.a_path = home; r.e_path.push_back(p);
+ p.a_path = home + "/.kde"; r.e_path.push_back(p);
+ p.a_path = home + "/.gnome2"; r.e_path.push_back(p);
+ p.a_path = home + "/.evolution"; r.e_path.push_back(p);
+ p.a_path = home + "/.mozilla"; r.e_path.push_back(p);
+ p.a_path = home + "/.mozilla-thunderbird"; r.e_path.push_back(p);
e_repository.push_back(r);
// add pattern to ignore hidden directories and hidden files
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic