recollindex: make sure that the computed lock file path is the same in all cases. Take the lock in a number of forgotten cases

This commit is contained in:
Jean-Francois Dockes
2020-08-31 11:28:44 +02:00
parent 20e845709e
commit 5ea2f7cc64
2 changed files with 122 additions and 127 deletions
+3 -1
View File
@@ -1398,7 +1398,9 @@ string RclConfig::getPidfile() const
if (p) {
string base = path_canon(p);
string digest, hex;
MD5String(getConfDir(), digest);
string cfdir = path_canon(getConfDir());
path_catslash(cfdir);
MD5String(cfdir, digest);
MD5HexPrint(digest, hex);
return path_cat(base, "/recoll-" + hex + "-index.pid");
}