From 10bd041c993f8617dd8edc189dec918339a1509b Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 17 Jul 2019 18:19:08 -0400 Subject: [PATCH] refuse startup when spool-dir and output-dir are the same reported in #808 Change-Id: I00e26d09d7557221dfdaf105559fb7eaa5ab3e50 --- recording-daemon/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recording-daemon/main.c b/recording-daemon/main.c index 42a9f6632..e9e31af3f 100644 --- a/recording-daemon/main.c +++ b/recording-daemon/main.c @@ -199,6 +199,9 @@ static void options(int *argc, char ***argv) { output_storage = OUTPUT_STORAGE_BOTH; else die("Invalid 'output-storage' option"); + + if ((output_storage & OUTPUT_STORAGE_FILE) && !strcmp(output_dir, spool_dir)) + die("The spool-dir cannot be the same as the output-dir"); }