package_daemon: create the administrative dir when mounted

This commit is contained in:
Ingo Weinhold
2013-07-06 17:48:03 +02:00
parent 3942ca0d5e
commit 600620e790
+7
View File
@@ -827,6 +827,13 @@ Volume::InitPackages(Listener* listener)
if (error != B_OK)
RETURN_ERROR(error);
// create the admin directory, if it doesn't exist yet
BDirectory packagesDirectory;
if (packagesDirectory.SetTo(&fPackagesDirectoryRef) == B_OK) {
if (!BEntry(&packagesDirectory, kAdminDirectoryName).Exists())
packagesDirectory.CreateDirectory(kAdminDirectoryName, NULL);
}
return B_OK;
}