Revert "LegacyPackageInstaller: Override fPathType when the path begins with /boot/."
This reverts commit8cf0752f1b. This reverts commitaf3057423c. This change fixed one package, and broke everything else. Please find a proper fix and actually test it before committing. Fixes #12909
This commit is contained in:
@@ -176,17 +176,7 @@ PackageItem::InitPath(const char* path, BPath* destination)
|
|||||||
{
|
{
|
||||||
status_t ret = B_OK;
|
status_t ret = B_OK;
|
||||||
|
|
||||||
// If the path starts with /boot/, treat it as a P_SYSTEM_PATH.
|
if (fPathType == P_INSTALL_PATH) {
|
||||||
// This may not be the correct way to handle such a case, but it fixes
|
|
||||||
// installation of the RefLine pkg.
|
|
||||||
if (fPathType == P_SYSTEM_PATH || (fPathType == P_INSTALL_PATH
|
|
||||||
&& strncmp("/boot/", path, 6) == 0)) {
|
|
||||||
if (gVerbose)
|
|
||||||
printf("InitPath - absolute: %s\n", fPath.String());
|
|
||||||
if (fPath == "")
|
|
||||||
fPath = "/";
|
|
||||||
ret = destination->SetTo(fPath.String());
|
|
||||||
} else if (fPathType == P_INSTALL_PATH) {
|
|
||||||
if (gVerbose)
|
if (gVerbose)
|
||||||
printf("InitPath - relative: %s + %s\n", path, fPath.String());
|
printf("InitPath - relative: %s + %s\n", path, fPath.String());
|
||||||
if (path == NULL) {
|
if (path == NULL) {
|
||||||
@@ -194,6 +184,12 @@ PackageItem::InitPath(const char* path, BPath* destination)
|
|||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
ret = destination->SetTo(path, fPath.String());
|
ret = destination->SetTo(path, fPath.String());
|
||||||
|
} else if (fPathType == P_SYSTEM_PATH) {
|
||||||
|
if (gVerbose)
|
||||||
|
printf("InitPath - absolute: %s\n", fPath.String());
|
||||||
|
if (fPath == "")
|
||||||
|
fPath = "/";
|
||||||
|
ret = destination->SetTo(fPath.String());
|
||||||
} else {
|
} else {
|
||||||
if (gVerbose)
|
if (gVerbose)
|
||||||
printf("InitPath - volume: %s + %s\n", path, fPath.String());
|
printf("InitPath - volume: %s + %s\n", path, fPath.String());
|
||||||
|
|||||||
Reference in New Issue
Block a user