LegacyPackageInstaller: Ignore files which do not end in ".pdb".
The LegacyPackageInstaller's data folder is (and has always been) "~/config/packages", which is of course the same directory that Haiku's (relatively) new package management system uses. We don't want the "administrative" folder and any HPKGs in that directory to show up in the "installed legacy packages" list, so ignore them.
This commit is contained in:
parent
e6efd8f21c
commit
bdf0ed4231
@ -351,8 +351,6 @@ UninstallView::_ReloadAppList()
|
||||
if (ret != B_OK)
|
||||
return ret;
|
||||
|
||||
fprintf(stderr, "Ichi! %s\n", fToPackages.Path());
|
||||
|
||||
BEntry iter;
|
||||
while (dir.GetNextEntry(&iter) == B_OK) {
|
||||
char filename[B_FILE_NAME_LENGTH];
|
||||
@ -363,6 +361,12 @@ UninstallView::_ReloadAppList()
|
||||
if (iter.GetNodeRef(&ref) != B_OK)
|
||||
continue;
|
||||
|
||||
if (strncmp(filename + (strnlen(filename, B_FILE_NAME_LENGTH) - 3),
|
||||
"pdb", 3) != 0) {
|
||||
printf("Ignoring non-package '%s'\n", filename);
|
||||
continue;
|
||||
}
|
||||
|
||||
printf("Found package '%s'\n", filename);
|
||||
_AddFile(filename, ref);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user