launch_daemon: fix check for existing directory

BEntry.InitCheck returns B_OK even if the leaf does not exist. So the
code in launch daemon to create directories (/tmp and
/var/shared_memory) was never run.

Fixes #12760.
This commit is contained in:
Adrien Destugues
2017-04-10 21:56:31 +02:00
parent 0cfd77ac3b
commit fd8d1d5656
@@ -23,7 +23,7 @@ status_t
AbstractEmptyDirectoryJob::CreateAndEmpty(const char* path) const
{
BEntry entry(path);
if (entry.InitCheck() != B_OK) {
if (!entry.Exists()) {
create_directory(path, 0777);
status_t status = entry.SetTo(path);