Pawel Tecza writes:
On Fri, 12 May 2006, Pawel Tecza wrote:
On Thu, 11 May 2006, Sam Varshavchik wrote:
[...]
But you shouldn't get double folders, unless something else is broken,
because sqwebmail should only attempt to create the sent folder once.
OK, I'll look at this and try to find a bug.
The Sqwebmail creates the Sent folder once, but it does it for
_each_ language version, if they use _different_ locale.
It's because of the following line in the rename_sent_folder()
function (sqwebmail.c file):
if (strftime (buf, sizeof(buf), "." SENT ".%Y.%m-%b", tm) == 0)
return;
Sigh… No, it's not because of that.
I thought that I was just doing this the first time I log in each month, but
I see that I just cheated here.
This whole thing shouldn't be done at every login, at all.
If the abbreviated month name is so important for you there,
you could add it while displaying names of .Sent folders.
That's just going to pile up two hacks on top of each other, in order to
cancel out each other's hackery.
I'm certain that without the month names it will just look plain ugly and
non-intuitive, but that's not how this should be done.
The way that this should be done is to have another file read/written via
read_sqconfig and write_sqconfig.
In rename_sent_folder, something like:
char ymbuf[128];
strftime(ymbuf, sizeof(ymbuf), "%Y%m", tm);
if ((lastym=read_sqconfig(".", "lastrenamesent", NULL)) &&
strcmp(lastym, ymbuf) == 0)
return;
And after renaming the sent folder:
write_sqconfig(".", "lastrenamesent", ymbuf);