🔧 Consider removals when appending packages to be uninstalled

This commit is contained in:
Ettore Di Giacinto
2021-12-15 18:48:34 +01:00
parent 0a90129e34
commit fbe9b038dd
2 changed files with 20 additions and 7 deletions

View File

@@ -31,7 +31,9 @@ func (s *System) OSCheck() (notFound pkg.Packages) {
defer s.Unlock()
for f, p := range s.fileIndex {
if _, err := os.Lstat(filepath.Join(s.Target, f)); err != nil {
notFound = append(notFound, p)
if _, err := s.Database.FindPackage(p); err == nil {
notFound = append(notFound, p)
}
}
}
notFound = notFound.Unique()