Fixed listing hidden folders as mods.
This commit is contained in:
parent
7d0e3a20c2
commit
33d1502a1b
1 changed files with 2 additions and 2 deletions
|
@ -251,7 +251,7 @@ def get_loaded_mods(cfg: Config) -> list:
|
||||||
ret = []
|
ret = []
|
||||||
with os.scandir(internal_mods_path) as it:
|
with os.scandir(internal_mods_path) as it:
|
||||||
for entry in it:
|
for entry in it:
|
||||||
if entry.is_symlink() and entry.is_dir():
|
if entry.is_symlink() and entry.is_dir() and not entry.name.startswith('.'):
|
||||||
# only
|
# only
|
||||||
ret.append(entry.name)
|
ret.append(entry.name)
|
||||||
return sorted(ret, key = lambda x: x.casefold())
|
return sorted(ret, key = lambda x: x.casefold())
|
||||||
|
@ -260,7 +260,7 @@ def get_available_mods(cfg: Config) -> list:
|
||||||
ret = []
|
ret = []
|
||||||
with os.scandir(cfg.mods_dir) as it:
|
with os.scandir(cfg.mods_dir) as it:
|
||||||
for entry in it:
|
for entry in it:
|
||||||
if entry.is_dir() and entry.name != "__pycache__":
|
if entry.is_dir() and not entry.name.startswith('.') and entry.name != "__pycache__":
|
||||||
ret.append(entry.name)
|
ret.append(entry.name)
|
||||||
return sorted(ret, key = lambda x: x.casefold())
|
return sorted(ret, key = lambda x: x.casefold())
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue