* Fix a bug that caused a logging problem but did not affect protocol behavior
[citadel.git] / citadel / modules / imap / imap_fetch.c
index 11303ef0dc5ea2051f9821d4c153c0163690f20b..db1fc2dd71c72d41d462d5316215388657c99952 100644 (file)
@@ -653,11 +653,9 @@ void imap_fetch_body(long msgnum, ConstStr item, int is_peek) {
                StrBufStripAllBut(partial, '<', '>');
                is_partial = 1;
        }
-       if (is_partial == 0) 
-               if (StrLength(partial) > 0) 
-                       CtdlLogPrintf(CTDL_DEBUG, 
-                                     "Partial is %s\n", 
-                                     ChrPtr(partial));
+       if ( (is_partial == 1) && (StrLength(partial) > 0) ) {
+               CtdlLogPrintf(CTDL_DEBUG, "Partial is <%s>\n", ChrPtr(partial));
+       }
 
        if (IMAP->cached_body == NULL) {
                CCC->redirect_buffer = NewStrBufPlain(NULL, SIZ);