mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-17 07:48:18 +01:00
Fixed for no case
This commit is contained in:
parent
aaf825c852
commit
a011d488f7
2 changed files with 4 additions and 3 deletions
|
@ -314,7 +314,7 @@ class Menu(Configs):
|
|||
f'{args=}, {self.flags=}, {self.repository=}')
|
||||
|
||||
def load_database(self):
|
||||
if self.repository != '*':
|
||||
if self.repository != '*' and not self.data:
|
||||
if self.is_binary:
|
||||
self.data: dict = BinQueries(self.repository).repository_data()
|
||||
else:
|
||||
|
@ -637,14 +637,15 @@ class Menu(Configs):
|
|||
command: str = Menu.search.__name__
|
||||
|
||||
if len(self.args) >= 2:
|
||||
self.load_database()
|
||||
self.check.is_database_empty()
|
||||
packages: list = self.is_file_list_packages()
|
||||
|
||||
if self.utils.is_option(self.flag_no_cases, self.flags) or not self.case_sensitive:
|
||||
self.load_database()
|
||||
packages: list = self.utils.case_insensitive_pattern_matching(packages, self.data)
|
||||
|
||||
if self.utils.is_option(self.flag_searches, self.flags):
|
||||
self.load_database()
|
||||
packages: list = self.choose.packages(self.data, packages, command)
|
||||
|
||||
pkgs = SearchPackage(self.flags, packages, self.repository)
|
||||
|
|
|
@ -205,7 +205,7 @@ class Utilities(Configs):
|
|||
repo_packages: tuple = tuple(data.keys())
|
||||
for package in packages:
|
||||
for pkg in repo_packages:
|
||||
if package == pkg.lower():
|
||||
if package.lower() == pkg.lower():
|
||||
packages.append(pkg)
|
||||
packages.remove(package)
|
||||
return packages
|
||||
|
|
Loading…
Reference in a new issue