Sieve FILEINTO was failing to locate public rooms in
authorArt Cancro <ajc@citadel.org>
Wed, 27 Dec 2006 14:51:40 +0000 (14:51 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 27 Dec 2006 14:51:40 +0000 (14:51 +0000)
certain situations.  Fixed.

citadel/serv_sieve.c

index fbb826416c81008fb214bc49e18d8682acdcdaf2..5ecbb472fd4a5997efc2e6f91f2914bfcf836c39 100644 (file)
@@ -184,12 +184,12 @@ int ctdl_fileinto(sieve2_context_t *s, void *my)
        c = getroom(&CC->room, foldername);
 
        /* Then a regular room name match (public and private rooms) */
-       if (c < 0) {
+       if (c != 0) {
                safestrncpy(foldername, dest_folder, sizeof foldername);
                c = getroom(&CC->room, foldername);
        }
 
-       if (c < 0) {
+       if (c != 0) {
                lprintf(CTDL_WARNING, "FILEINTO failed: target <%s> does not exist\n", dest_folder);
                return SIEVE2_ERROR_BADARGS;
        }