From 480276c3160d2aae4e83ad475634a1d1d92e3dba Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Sat, 24 Feb 2024 22:40:05 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Test=20if=20iter=20around?= =?UTF-8?q?=20roms=20dir?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/retro.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/commands/retro.py b/commands/retro.py index 8f54c61..ec457ef 100644 --- a/commands/retro.py +++ b/commands/retro.py @@ -16,7 +16,11 @@ if not path.is_dir(): exit(1) for console in path.iterdir(): - if console.is_dir() and Path(console / "roms").is_dir(): + if ( + console.is_dir() + and Path(console / "roms").is_dir() + and list(Path(console / "roms").iterdir()) + ): # run has_files run(["has_files.sh", f"{console.name}/roms", console.name, "true", path])