Fix previous fix about locating lockfile in XDG_RUNTIME_DIR: would always compute the same lock name
This commit is contained in:
parent
d48a0619b1
commit
610e3282c3
@ -1396,10 +1396,11 @@ string RclConfig::getPidfile() const
|
|||||||
{
|
{
|
||||||
const char *p = getenv("XDG_RUNTIME_DIR");
|
const char *p = getenv("XDG_RUNTIME_DIR");
|
||||||
if (p) {
|
if (p) {
|
||||||
string base = path_canon(p);
|
string base = path_canon(p);
|
||||||
string digest;
|
string digest, hex;
|
||||||
return path_cat(
|
MD5String(getConfDir(), digest);
|
||||||
base, "/recoll-" + MD5HexPrint(getConfDir(), digest) + "-index.pid");
|
MD5HexPrint(digest, hex);
|
||||||
|
return path_cat(base, "/recoll-" + hex + "-index.pid");
|
||||||
}
|
}
|
||||||
return path_cat(getCacheDir(), "index.pid");
|
return path_cat(getCacheDir(), "index.pid");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user