diff --git a/src/apps/packageinstaller/PackageInfo.cpp b/src/apps/packageinstaller/PackageInfo.cpp index cc75212e8b..2bd2a7c8e6 100644 --- a/src/apps/packageinstaller/PackageInfo.cpp +++ b/src/apps/packageinstaller/PackageInfo.cpp @@ -1092,7 +1092,9 @@ PackageInfo::_AddItem(PkgItem *item, uint64 size, uint32 groups, uint32 path, // Add the item to all groups it resides in uint32 i, n = fProfiles.CountItems(), mask = 1; pkg_profile *profile; - + + fFiles.AddItem(item); + for (i = 0;i < n;i++) { if (groups & mask) { profile = static_cast(fProfiles.ItemAt(i)); @@ -1117,19 +1119,3 @@ PackageInfo::_AddItem(PkgItem *item, uint64 size, uint32 groups, uint32 path, } } - -// #pragma mark - - - -pkg_profile::~pkg_profile() -{ - PkgItem *iter = 0; - while (1) { - iter = static_cast(items.RemoveItem((long int)0)); - if (iter) - delete iter; - else - break; - } -} - diff --git a/src/apps/packageinstaller/PackageInfo.h b/src/apps/packageinstaller/PackageInfo.h index 537ec9aa3a..81ab800294 100644 --- a/src/apps/packageinstaller/PackageInfo.h +++ b/src/apps/packageinstaller/PackageInfo.h @@ -64,7 +64,7 @@ class PackageInfo { struct pkg_profile { pkg_profile() : items(10), space_needed(0), path_type(P_SYSTEM_PATH) {} - ~pkg_profile(); + ~pkg_profile() {} BString name; BString description;