4 messages in net.sourceforge.lists.courier-sqwebmail[sqwebmail] Empty message signature
FromSent OnAttachments
Pawel TeczaJul 25, 2006 6:36 am 
Alessio CecchiJul 26, 2006 1:41 am 
Pawel TeczaJul 31, 2006 12:35 am 
Alessio CecchiJul 31, 2006 7:55 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[sqwebmail] Empty message signatureActions...
From:Pawel Tecza (p.te@net.icm.edu.pl)
Date:Jul 25, 2006 6:36:18 am
List:net.sourceforge.lists.courier-sqwebmail

Hi Sam,

This patch removes two empty lines from beginning of a new message edit box, if user's signature file has 0 bytes length.

These a bit annoying lines occur when an user initially created his signature and later he deleted it.

I think it's useful fix, because an user can't delete a sqwebmail-sig file. He only can purge a content of this file.

The patch is below:

Index: webmail/newmsg.c =================================================================== RCS file: /cvsroot/courier/courier/webmail/newmsg.c,v retrieving revision 1.61 diff -u -r1.61 newmsg.c --- webmail/newmsg.c 22 Jul 2006 21:54:00 -0000 1.61 +++ webmail/newmsg.c 25 Jul 2006 13:12:46 -0000 @@ -707,8 +707,14 @@ { char buf[256]; int n; + struct stat stat_buf; + unsigned long filesize=0; + + if (stat(SIGNATURE, &stat_buf) == 0) + filesize=stat_buf.st_size; + if (filesize > 0) + printf("\n\n");

- printf("\n\n"); while ((n=fread(buf, 1, sizeof(buf)-1, fp)) > 0) { buf[n]=0;

Best regards,