From 27ec8243b2c477977a8b48cb18b10e545ffde871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sun, 20 Apr 2008 15:57:54 +0000 Subject: [PATCH] fixed bug #2101 : normalize user paths, use localType for links git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25081 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/packageinstaller/PackageInfo.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/apps/packageinstaller/PackageInfo.cpp b/src/apps/packageinstaller/PackageInfo.cpp index ced4069fae..cc75212e8b 100644 --- a/src/apps/packageinstaller/PackageInfo.cpp +++ b/src/apps/packageinstaller/PackageInfo.cpp @@ -572,6 +572,8 @@ PackageInfo::Parse() fPackageFile->Read(pathname, length); pathname[length] = 0; BString *path = new BString(pathname); + if (length > 0 && pathname[length - 1] == '/') + path->Remove(length - 1, 1); userPaths.AddItem(path); delete pathname; } @@ -1025,8 +1027,10 @@ PackageInfo::Parse() } } - parser_debug("Adding link: %s!\n", dest.String()); - item = new PkgLink(fPackageFile, dest, linkString, pathType, + parser_debug("Adding link: %s! (type %s)\n", dest.String(), + pathType == P_SYSTEM_PATH ? "System" + : (localType == P_INSTALL_PATH ? "Install" : "User")); + item = new PkgLink(fPackageFile, dest, linkString, localType, ctime, mtime, mode, offset, size); } }