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:
@@ -351,8 +351,6 @@ UninstallView::_ReloadAppList()
|
|||||||
if (ret != B_OK)
|
if (ret != B_OK)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
fprintf(stderr, "Ichi! %s\n", fToPackages.Path());
|
|
||||||
|
|
||||||
BEntry iter;
|
BEntry iter;
|
||||||
while (dir.GetNextEntry(&iter) == B_OK) {
|
while (dir.GetNextEntry(&iter) == B_OK) {
|
||||||
char filename[B_FILE_NAME_LENGTH];
|
char filename[B_FILE_NAME_LENGTH];
|
||||||
@@ -363,6 +361,12 @@ UninstallView::_ReloadAppList()
|
|||||||
if (iter.GetNodeRef(&ref) != B_OK)
|
if (iter.GetNodeRef(&ref) != B_OK)
|
||||||
continue;
|
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);
|
printf("Found package '%s'\n", filename);
|
||||||
_AddFile(filename, ref);
|
_AddFile(filename, ref);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user