Add parameter to chdir on recollindex startup, /tmp by default. Closes issue #129

This commit is contained in:
Jean-Francois Dockes
2013-03-07 11:05:54 +01:00
parent 73648e0052
commit 4a870f984d
5 changed files with 26 additions and 3 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ bool fsocc(const string &path, int *pc, long *blocks)
return true;
}
static const string& tmplocation()
const string& tmplocation()
{
static string stmpdir;
if (stmpdir.empty()) {
+4 -1
View File
@@ -74,7 +74,10 @@ bool fsocc(const string &path, int *pc, // Percent occupied
long *avmbs = 0 // Mbs available to non-superuser
);
/// Create temporary directory
/// Retrieve the temp dir location: $RECOLL_TMPDIR else $TMPDIR else /tmp
extern const string& tmplocation();
/// Create temporary directory (inside the temp location)
extern bool maketmpdir(string& tdir, string& reason);
/// mkdir -p