diff --git a/src/lib-sieve/storage/file/sieve-file-storage.c b/src/lib-sieve/storage/file/sieve-file-storage.c
index 51cc7c4d17973fad235537825ddee49542f54bd4..6e814f98535695234ef92dbd50483e8ec1c63c6c 100644
--- a/src/lib-sieve/storage/file/sieve-file-storage.c
+++ b/src/lib-sieve/storage/file/sieve-file-storage.c
@@ -479,11 +479,11 @@ sieve_file_storage_init_common(struct sieve_file_storage *fstorage,
 }
 
 static int
-sieve_file_storage_init(struct sieve_storage *storage,
-			const char *const *options)
+sieve_file_storage_init_from_settings(
+	struct sieve_file_storage *fstorage,
+	const char *const *options)
 {
-	struct sieve_file_storage *fstorage =
-		container_of(storage, struct sieve_file_storage, storage);
+	struct sieve_storage *storage = &fstorage->storage;
 	const char *storage_path = storage->location;
 	const char *value, *active_path = "";
 	bool exists = FALSE;
@@ -575,6 +575,21 @@ sieve_file_storage_init(struct sieve_storage *storage,
 					      storage_path, exists);
 }
 
+static int
+sieve_file_storage_init(struct sieve_storage *storage,
+			const char *const *options)
+{
+	struct sieve_file_storage *fstorage =
+		container_of(storage, struct sieve_file_storage, storage);
+	int ret;
+
+	ret = sieve_file_storage_init_from_settings(fstorage, options);
+	if (ret < 0)
+		return -1;
+
+	return ret;
+}
+
 static void
 sieve_file_storage_autodetect(struct sieve_file_storage *fstorage,
 			      const char **storage_path_r)