mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-10 21:43:23 -05:00
fix: refuse --refresh-data where nothing refreshes
This commit is contained in:
1 parent
38ee085722
commit
cdecb096a1
2 files changed
+17
No files matched your search
@@ -2457,6 +2457,18 @@ def _refuse_unapplied_flags(args, parser) -> None:
|
||||
parser.error("--region is incompatible with --manifest-targets")
|
||||
if args.one_per_slot and args.manifest_targets:
|
||||
parser.error("--one-per-slot is incompatible with --manifest-targets")
|
||||
# Only the platform pack path refreshes the data directories; elsewhere
|
||||
# the cache on disk was packed as it stood.
|
||||
if args.refresh_data:
|
||||
if args.offline:
|
||||
parser.error("--refresh-data is incompatible with --offline")
|
||||
for flag, on in (
|
||||
("--emulator", args.emulator),
|
||||
("--system", args.system and not (args.platform or args.all)),
|
||||
("--from-md5", args.from_md5 or args.from_md5_file),
|
||||
):
|
||||
if on:
|
||||
parser.error(f"--refresh-data is incompatible with {flag}")
|
||||
|
||||
_refuse_for_all_variants(args, parser)
|
||||
mode = next(
|
||||
|
||||
@@ -6004,6 +6004,11 @@ struct BurnDriver BurnDrvneogeo = {
|
||||
"refuse"),
|
||||
(["--list-systems"], ["--region", "us"], "refuse"),
|
||||
(["--list-emulators"], ["--target", "switch"], "refuse"),
|
||||
# Only the platform path refreshes data directories.
|
||||
(["--emulator", "dolphin"], ["--refresh-data"], "refuse"),
|
||||
(["--system", "sony-playstation"], ["--refresh-data"], "refuse"),
|
||||
(["--from-md5", "d8f1"], ["--refresh-data"], "refuse"),
|
||||
(["--platform", "retroarch", "--offline"], ["--refresh-data"], "refuse"),
|
||||
]
|
||||
for mode, flag, expected in matrix:
|
||||
with self.subTest(mode=mode, flag=flag):
|
||||
|
||||
Reference in new issue
Block a user