From ea2f9240135ee9ea8ead5e06ea7437299dd3ef8d Mon Sep 17 00:00:00 2001
From: Stephan Bosch <stephan.bosch@open-xchange.com>
Date: Fri, 1 Nov 2024 00:26:21 +0100
Subject: [PATCH] lib-sieve: storage: file: sieve-file-storage - Refactor
 sieve_file_storage_init_from_settings()

---
 src/lib-sieve/storage/file/sieve-file-storage.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/lib-sieve/storage/file/sieve-file-storage.c b/src/lib-sieve/storage/file/sieve-file-storage.c
index 6e814f985..34f12f3d1 100644
--- a/src/lib-sieve/storage/file/sieve-file-storage.c
+++ b/src/lib-sieve/storage/file/sieve-file-storage.c
@@ -560,15 +560,14 @@ sieve_file_storage_init_from_settings(
 		}
 	}
 
-	if (active_path == NULL || *active_path == '\0') {
-		if (storage->main_storage ||
-		    (storage->flags & SIEVE_STORAGE_FLAG_READWRITE) != 0) {
-			e_debug(storage->event,
-				"Active script path is unconfigured; "
-				"using default (path=%s)",
-				SIEVE_FILE_DEFAULT_PATH);
-			active_path = SIEVE_FILE_DEFAULT_PATH;
-		}
+	if ((active_path == NULL || *active_path == '\0') &&
+	    (storage->main_storage ||
+	     (storage->flags & SIEVE_STORAGE_FLAG_READWRITE) != 0)) {
+		e_debug(storage->event,
+			"Active script path is unconfigured; "
+			"using default (path=%s)",
+			SIEVE_FILE_DEFAULT_PATH);
+		active_path = SIEVE_FILE_DEFAULT_PATH;
 	}
 
 	return sieve_file_storage_init_common(fstorage, active_path,
-- 
GitLab