From 42dc71e8fa13849b92d9a9dac58e9e4c3e4c8fcb Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 3 Jul 2021 13:31:08 +0200 Subject: [PATCH] added check if loading tape file fails when auto-processing tapes --- src/tape.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/tape.c b/src/tape.c index 2ff74646..82792fe1 100644 --- a/src/tape.c +++ b/src/tape.c @@ -1425,6 +1425,14 @@ void AutoPlayTapes(void) LoadTapeFromFilename(tape_filename); + if (tape.no_valid_file) + { + if (!fileExists(tape_filename)) + Fail("tape file '%s' does not exist", tape_filename); + else + Fail("cannot load tape file '%s'", tape_filename); + } + global.autoplay_leveldir = tape.level_identifier; if (tape.level_nr >= 0 && tape.level_nr < MAX_TAPES_PER_SET) -- 2.34.1