package_daemon: fix path of activated-package files
Until now the activated-packages file was not used for anything, because it was not looked for in the correct place. Change-Id: Ib38f28b52e85af6900c0e2b61a9621734428ad25 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2341 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
1757f197bd
commit
228006ea74
@@ -986,10 +986,22 @@ Volume::_InitLatestState()
|
||||
status_t
|
||||
Volume::_InitLatestStateFromActivatedPackages()
|
||||
{
|
||||
// open admin directory
|
||||
BDirectory adminDirectory;
|
||||
status_t error = _OpenPackagesSubDirectory(
|
||||
RelativePath(kAdminDirectoryName), false, adminDirectory);
|
||||
if (error != B_OK)
|
||||
RETURN_ERROR(error);
|
||||
|
||||
node_ref adminNode;
|
||||
error = adminDirectory.GetNodeRef(&adminNode);
|
||||
if (error != B_OK)
|
||||
RETURN_ERROR(error);
|
||||
|
||||
// try reading the activation file
|
||||
NotOwningEntryRef entryRef(PackagesDirectoryRef(), kActivationFileName);
|
||||
NotOwningEntryRef entryRef(adminNode, kActivationFileName);
|
||||
BFile file;
|
||||
status_t error = file.SetTo(&entryRef, B_READ_ONLY);
|
||||
error = file.SetTo(&entryRef, B_READ_ONLY);
|
||||
if (error != B_OK) {
|
||||
INFORM("Failed to open packages activation file: %s\n",
|
||||
strerror(error));
|
||||
|
||||
Reference in New Issue
Block a user