From 72bb8b71b61da22726b7b495eabd305e39d1c466 Mon Sep 17 00:00:00 2001 From: Martin Griffin Date: Thu, 22 Jun 2023 17:17:19 +0100 Subject: [PATCH] More conservative unlink error in Hydra --- tools/mgba-rom-test-hydra/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/mgba-rom-test-hydra/main.c b/tools/mgba-rom-test-hydra/main.c index 14caa6144a..48071ef8fa 100644 --- a/tools/mgba-rom-test-hydra/main.c +++ b/tools/mgba-rom-test-hydra/main.c @@ -168,7 +168,11 @@ static void unlink_roms(void) if (runners[i].rom_path[0]) { if (unlink(runners[i].rom_path) == -1) - perror("unlink rom_path failed"); + { + int fd; + if ((fd = open(runners[i].rom_path, O_RDONLY)) != -1) + perror("unlink rom_path failed"); + } } } }