[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-mailutils] folder_create() on $HOME/Mail fails with ENOENT in C
From: |
Joachim Nilsson |
Subject: |
Re: [bug-mailutils] folder_create() on $HOME/Mail fails with ENOENT in CVS code. |
Date: |
Sat, 10 Jul 2004 00:30:25 +0200 |
So I finally sat down and looked into it myself. Here goes:
1. In mailutils-0.4 registrar.c:record_is_scheme() matches "/" to
"/home/jocke/Mail" and then everything proceeds as expected and
the below code can proceed to folder_list().
2. In mailutils-0.5 and current CVS registrar.c:record_is_scheme()
finds an is_scheme method for the path_record that was not there
in ver. <= 0.4. This method did not take directories into account.
Below see the attached patch.
If you want a properly formatted ChangeLog entry to go with this patch
just holler and I'll send one in. Otherwise it's quite trivial. Ah,
there's a minor spelling fix as well.
Using this patch I can read the ~/Mail symlink, which points to the
~/mail directory, and list the mbox:es inside it just like I could in
mailutils-0.4.
Regards
/Jocke
On Fri, 2004-07-09 at 14:05, Joachim Nilsson wrote:
> On Thu, 2004-06-03 at 10:43, Sergey Poznyakoff wrote:
> > > the folder_create() interface seems to have changed between 0.4.0
> > > and 0.4.1 (CVS). In 0.4.0 I could list my mailboxes in ~/Mail/*
> > > using very simple code, see below.
> > This is due to autodetection of local folder formats. I'll investigate
> > this and post detailed info later.
>
> I've tried this again with both mailutils-0.5 and the latest in CVS.
> No luck ...
>
> ---------------------------------------------------------------------
> mu_register_local_mbox_formats();
>
> status = folder_create (&folder, "file://home/jocke/Mail");
> if (status)
> {
> set_status (mu_strerror (status));
> return status;
> }
>
> status = folder_list (folder, url, "*", &woy);
> ---------------------------------------------------------------------
>
> folder_create() always returns status=MU_ERR_NOENT, i.e., "Requested
> item not found".
>
> Note: /home/jocke/Mail is a symlink to /home/jocke/mail. I've tried
> calling folder_create() with the following url's:
> /home/jocke/mail
> /home/jocke/mail/
> /home/jocke/Mail
> /home/jocke/Mail/
> file://home/jocke/mail
> file://home/jocke/mail/
> file://home/jocke/Mail
> file://home/jocke/Mail/
> <file://home/jocke/mail>
> <file://home/jocke/mail/>
> <file://home/jocke/Mail>
> <file://home/jocke/Mail/>
>
> Is it something obvious I've forgotten maybe?
>
> Regards
> /Jocke
>
>
>
>
>
>
> _______________________________________________
> Bug-mailutils mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-mailutils
--
Joachim Nilsson :: <joachim AT vmlinux DOT org>
+46(0)21-123348 :: <http://vmlinux.org/joachim/>
patch-mailbox_mbox_folder.c~1.21~
Description: Text Data