dovecot-2.2-pigeonhole: lib-sieve: file storage: Fixed bug in st...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Mon Mar 16 21:10:02 UTC 2015


details:   http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/07e25d04d8f2
changeset: 2019:07e25d04d8f2
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Mon Mar 16 22:09:55 2015 +0100
description:
lib-sieve: file storage: Fixed bug in storage path normalization.
A conditional expression was inverted, causing the path to remain unnormalized.

diffstat:

 src/lib-sieve/storage/file/sieve-file-storage.c |  23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diffs (42 lines):

diff -r 28710e1201e9 -r 07e25d04d8f2 src/lib-sieve/storage/file/sieve-file-storage.c
--- a/src/lib-sieve/storage/file/sieve-file-storage.c	Sun Mar 15 00:15:54 2015 +0100
+++ b/src/lib-sieve/storage/file/sieve-file-storage.c	Mon Mar 16 22:09:55 2015 +0100
@@ -444,7 +444,7 @@
 		(fstorage, storage_path, error_r) < 0 )
 		return -1;
 
-	if ( !have_link ) {
+	if ( have_link ) {
 		if ( t_realpath(storage_path, &storage_path) < 0 ) {
 			sieve_storage_sys_error(storage,
 				"Failed to normalize storage path (path=%s): %m",
@@ -452,18 +452,19 @@
 			*error_r = SIEVE_ERROR_TEMP_FAILURE;
 			return -1;
 		}
-	} else if ( active_path != NULL && *active_path != '\0' ) {
-		/* Get the path to be prefixed to the script name in the symlink
-		 * pointing to the active script.
-		 */
-		link_path = sieve_storage_get_relative_link_path
-			(fstorage->active_path, storage_path);
+		if ( active_path != NULL && *active_path != '\0' ) {
+			/* Get the path to be prefixed to the script name in the symlink
+			 * pointing to the active script.
+			 */
+			link_path = sieve_storage_get_relative_link_path
+				(fstorage->active_path, storage_path);
 
-		sieve_storage_sys_debug(storage,
-			"Relative path to sieve storage in active link: %s",
-			link_path);
+			sieve_storage_sys_debug(storage,
+				"Relative path to sieve storage in active link: %s",
+				link_path);
 
-		fstorage->link_path = p_strdup(storage->pool, link_path);
+			fstorage->link_path = p_strdup(storage->pool, link_path);
+		}
 	}
 
 	fstorage->path = p_strdup(storage->pool, storage_path);


More information about the dovecot-cvs mailing list