Minor adjustment to prefix scanner

This commit is contained in:
Mathieu Comandon 2023-01-31 15:57:05 -08:00
parent 40cd119aea
commit 4d3d04d4ec
3 changed files with 7 additions and 7 deletions

View file

@ -27,7 +27,7 @@ from lutris.gui.widgets.game_bar import GameBar
from lutris.gui.widgets.gi_composites import GtkTemplate
from lutris.gui.widgets.sidebar import LutrisSidebar
from lutris.gui.widgets.utils import load_icon_theme, open_uri
from lutris.scanners.lutris import remove_from_path_cache, add_to_path_cache, get_missing_game_ids
from lutris.scanners.lutris import add_to_path_cache, get_missing_game_ids, remove_from_path_cache
# pylint: disable=no-member
from lutris.services.base import BaseService
from lutris.services.lutris import LutrisService

View file

@ -206,7 +206,6 @@ def init_lutris():
cleanup_games()
class StartupRuntimeUpdater(RuntimeUpdater):
"""Due to circular reference problems, we need to keep all these interesting
references here, out of runtime.py"""

View file

@ -17,6 +17,7 @@ PROGRAM_FILES_IGNORES = {
"InstallShield Installation Information": "*",
"Microsoft XNA": "*",
"Microsoft.NET": "*",
"GameSpy Arcade": "*"
}
IGNORED_DIRS = {
@ -72,6 +73,8 @@ IGNORED_EXES = [
"dotNetFx40_Full_setup.exe",
"sysinfo.exe",
"register.exe",
"UNINSTAL.EXE",
"GSArcade.exe",
]
KNOWN_DIRS = [
@ -137,14 +140,14 @@ def get_content_folders(path):
if files:
found_dirs.append(root)
folders = []
for dir in found_dirs:
for found_dir in found_dirs:
skip = False
for _dir in folders:
if dir.startswith(_dir):
if found_dir.startswith(_dir):
skip = True
if skip:
continue
folders.append(dir)
folders.append(found_dir)
return folders
@ -159,8 +162,6 @@ def find_exes_in_path(folder):
continue
if filename.lower().endswith(".exe"):
exes.append(os.path.join(folder, filename))
# if "executable" in file_type:
# print(filename, file_type)
return exes