Fix empty folders being considered as kitten

When pulling a git commit that contains delete folder actions, the local
folders will not be deleted.
This commit is contained in:
pagedown 2023-03-16 08:20:05 +08:00
parent e2fda5d1c4
commit 97ef09b633
No known key found for this signature in database
GPG Key ID: E921CF18AC8FF6EB

View File

@ -133,7 +133,7 @@ def run_kitten(kitten: str, run_name: str = '__main__') -> None:
def all_kitten_names() -> FrozenSet[str]: def all_kitten_names() -> FrozenSet[str]:
ans = [] ans = []
for name in list_kitty_resources('kittens'): for name in list_kitty_resources('kittens'):
if '__' not in name and '.' not in name and name != 'tui': if '__' not in name and '.' not in name and 'main.py' in list_kitty_resources(f'kittens.{name}'):
ans.append(name) ans.append(name)
return frozenset(ans) return frozenset(ans)