From aec3e63ed17a4c743f46ab707dd47c646ed8f6f4 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 25 Sep 2016 18:48:48 +0200 Subject: [PATCH] Revert "LegacyPackageInstaller: Override fPathType when the path begins with /boot/." This reverts commit 8cf0752f1bde487b7b78c6f375d22181023e32c2. This reverts commit af3057423c2951d7a1652cf7383b2fafe12872b6. This change fixed one package, and broke everything else. Please find a proper fix and actually test it before committing. Fixes #12909 --- src/apps/packageinstaller/PackageItem.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/apps/packageinstaller/PackageItem.cpp b/src/apps/packageinstaller/PackageItem.cpp index 46bd039bae..43fa932ba5 100644 --- a/src/apps/packageinstaller/PackageItem.cpp +++ b/src/apps/packageinstaller/PackageItem.cpp @@ -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());