Handle windows paths: mostly change tests for relative, and some other tweaks.

--HG--
branch : WINDOWSPORT
This commit is contained in:
Jean-Francois Dockes
2015-08-31 17:20:04 +02:00
parent 3aeffea387
commit 94da56aadc
12 changed files with 46 additions and 19 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ BeagleQueueCache::BeagleQueueCache(RclConfig *cnf)
ccdir = "webcache";
ccdir = path_tildexpand(ccdir);
// If not an absolute path, compute relative to config dir
if (ccdir.at(0) != '/')
if (!path_isabsolute(ccdir))
ccdir = path_cat(cnf->getConfDir(), ccdir);
int maxmbs = 40;
-2
View File
@@ -150,7 +150,6 @@ RclConfig::RclConfig(const string *argcnf)
// Compute our data dir name, typically /usr/local/share/recoll
m_datadir = path_sharedatadir();
fprintf(stderr, "RclConfig::RclConfig:: datadir: [%s]\n", m_datadir.c_str());
// We only do the automatic configuration creation thing for the default
// config dir, not if it was specified through -c or RECOLL_CONFDIR
bool autoconfdir = false;
@@ -172,7 +171,6 @@ RclConfig::RclConfig(const string *argcnf)
m_confdir = path_cat(path_homedata(), path_defaultrecollconfsubdir());
}
}
fprintf(stderr, "RclConfig::RclConfig:: confdir: [%s]\n", m_confdir.c_str());
// Note: autoconfdir and isDefaultConfig() are normally the same. We just
// want to avoid the imperfect test in isDefaultConfig() if we actually know
+1 -1
View File
@@ -112,7 +112,7 @@ RclConfig *recollinit(RclInitFlags flags,
if (!logfilename.empty()) {
logfilename = path_tildexpand(logfilename);
// If not an absolute path or , compute relative to config dir
if (logfilename.at(0) != '/' &&
if (!path_isabsolute(logfilename) &&
!DebugLog::DebugLog::isspecialname(logfilename.c_str())) {
logfilename = path_cat(config->getConfDir(), logfilename);
}