Revert "LegacyPackageInstaller: Override fPathType when the path begins with /boot/."

This reverts commit 8cf0752f1b.
This reverts commit af3057423c.

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:
Adrien Destugues 2016-09-25 18:48:48 +02:00
parent 09bb8269ac
commit aec3e63ed1
1 changed files with 7 additions and 11 deletions

View File

@ -176,17 +176,7 @@ PackageItem::InitPath(const char* path, BPath* destination)
{
status_t ret = B_OK;
// If the path starts with /boot/, treat it as a P_SYSTEM_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 (fPathType == P_INSTALL_PATH) {
if (gVerbose)
printf("InitPath - relative: %s + %s\n", path, fPath.String());
if (path == NULL) {
@ -194,6 +184,12 @@ PackageItem::InitPath(const char* path, BPath* destination)
return B_ERROR;
}
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 {
if (gVerbose)
printf("InitPath - volume: %s + %s\n", path, fPath.String());