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"); + } } } }