From 19cffe3ef4ca1b0663bebd90e69fd13a2e094ed9 Mon Sep 17 00:00:00 2001 From: Sam Stenvall Date: Mon, 5 Aug 2024 13:53:34 +0300 Subject: [PATCH] Fail if the cache directory is unusable --- src/minisatip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/minisatip.c b/src/minisatip.c index 877c169fb7..56dac28ee6 100644 --- a/src/minisatip.c +++ b/src/minisatip.c @@ -1911,7 +1911,9 @@ int main(int argc, char *argv[]) { DEBUGL(log_it, "DEBUG of the module enabled: %s", loglevels[i]); } - mkdir_recursive(opts.cache_dir); + if (mkdir_recursive(opts.cache_dir) == -1) { + FAIL("Failed to create cache directory %s", opts.cache_dir); + } readBootID(); if ((rtsp = tcp_listen(opts.bind, opts.rtsp_port, opts.use_ipv4_only)) < 1) FAIL("RTSP: Could not listen on port %d", opts.rtsp_port);