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,11 +1396,12 @@ string RclConfig::getPidfile() const
|
||||
{
|
||||
const char *p = getenv("XDG_RUNTIME_DIR");
|
||||
if (p) {
|
||||
string base = path_canon(p);
|
||||
string digest;
|
||||
return path_cat(
|
||||
base, "/recoll-" + MD5HexPrint(getConfDir(), digest) + "-index.pid");
|
||||
}
|
||||
string base = path_canon(p);
|
||||
string digest, hex;
|
||||
MD5String(getConfDir(), digest);
|
||||
MD5HexPrint(digest, hex);
|
||||
return path_cat(base, "/recoll-" + hex + "-index.pid");
|
||||
}
|
||||
return path_cat(getCacheDir(), "index.pid");
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user