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:
@@ -23,7 +23,7 @@ status_t
|
|||||||
AbstractEmptyDirectoryJob::CreateAndEmpty(const char* path) const
|
AbstractEmptyDirectoryJob::CreateAndEmpty(const char* path) const
|
||||||
{
|
{
|
||||||
BEntry entry(path);
|
BEntry entry(path);
|
||||||
if (entry.InitCheck() != B_OK) {
|
if (!entry.Exists()) {
|
||||||
create_directory(path, 0777);
|
create_directory(path, 0777);
|
||||||
|
|
||||||
status_t status = entry.SetTo(path);
|
status_t status = entry.SetTo(path);
|
||||||
|
|||||||
Reference in New Issue
Block a user