Ticket #2845 (closed defect: fixed)

Opened 21 months ago

Last modified 21 months ago

Bug#298121: header cache patch should use realpath for maildir

Reported by: Christoph Berg <cb@…> Owned by: mutt-dev
Priority: minor Milestone:
Component: mutt Version:
Keywords: Cc:

Description

The following was submitted as Debian bug #298121:

----- Forwarded message from Daniel Jacobowitz <dan@debian.org> -----

Date: Fri, 4 Mar 2005 16:31:06 -0500
From: Daniel Jacobowitz <dan@debian.org>
Reply-To: Daniel Jacobowitz <dan@debian.org>, 298121@bugs.debian.org
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Bug#298121: mutt: header cache patch should use realpath for mai=
ldir

Package: mutt
Version: 1.5.6-20040907+3
Severity: normal

If I open a maildir using mutt's mailboxes list, and then open it using
"mutt -f Mail/drow", the header cache creates a second cache.  They're
the same mailbox, but one is "Mail/drow" and the other is
"/home/drow/Mail/drow".

This could conceivably lead to false matches, also, since it uses relativ=
e
paths.

--=20
Daniel Jacobowitz
CodeSourcery, LLC

----- End forwarded message -----
----- Forwarded message from Thomas Glanzmann <sithglan@stud.uni-erlangen=
.de> -----

Date: Thu, 10 Mar 2005 15:00:53 +0100
From: Thomas Glanzmann <sithglan@stud.uni-erlangen.de>
Reply-To: Thomas Glanzmann <sithglan@stud.uni-erlangen.de>,
	298121@bugs.debian.org
To: 298121@bugs.debian.org
Subject: Bug#298121: mutt: header cache patch should use realpath for mai=
ldir

Hello Dato,

* Adeodato Sim=F3 <asp16@alu.ua.es> [050310 07:10]:
>   Just in case you didn't spot it already.

I described from the lists.

> > If I open a maildir using mutt's mailboxes list, and then open it usi=
ng
> > "mutt -f Mail/drow", the header cache creates a second cache.  They'r=
e
> > the same mailbox, but one is "Mail/drow" and the other is
> > "/home/drow/Mail/drow".

I could hack something up next monday to prepend cwd if mailbox path
doesn't start with a '/'.

> > This could conceivably lead to false matches, also, since it uses rel=
ative
> > paths.

In praxis not.

Greetings,
	Thomas

----- End forwarded message -----
----- Forwarded message from Lionel Elie Mamane <lionel@mamane.lu> -----

Date: Sat, 9 Sep 2006 13:57:39 +0200
From: Lionel Elie Mamane <lionel@mamane.lu>
Reply-To: Lionel Elie Mamane <lionel@mamane.lu>, 298121@bugs.debian.org
To: Thomas Glanzmann <sithglan@stud.uni-erlangen.de>
Cc: 298121@bugs.debian.org
Subject: Bug#298121: mutt: header cache patch should use realpath for mai=
ldir

On Thu, Mar 10, 2005 at 03:00:53PM +0100, Thomas Glanzmann wrote:
> * Adeodato Sim=F3 <asp16@alu.ua.es> [050310 07:10]:
>>   Just in case you didn't spot it already.

> I described from the lists.

>>> If I open a maildir using mutt's mailboxes list, and then open it
>>> using "mutt -f Mail/drow", the header cache creates a second
>>> cache.  They're the same mailbox, but one is "Mail/drow" and the
>>> other is "/home/drow/Mail/drow".

> I could hack something up next monday to prepend cwd if mailbox path
> doesn't start with a '/'.

That's not enough: I now hit the problem when opening the same Maildir
folder as "foo" and "foo/"; again two different caches are created.

(I typically use "foo" with the bash mutt-specific autocompletion
 because that's what it gives me and "foo/" with the internal mutt
 autocompletion on "open mailbox", because that's what it gives me.)

Also consider symlinks in the path, etc. Really, your best approach as
far as I understand is to use realpath() on the filename/path of the
mailbox before md5-ing it.

--=20
Lionel

----- End forwarded message -----
----- Forwarded message from Thomas Glanzmann <sithglan@stud.uni-erlangen=
.de> -----

Date: Sat, 9 Sep 2006 15:29:31 +0200
From: Thomas Glanzmann <sithglan@stud.uni-erlangen.de>
Reply-To: Thomas Glanzmann <sithglan@stud.uni-erlangen.de>,
	298121@bugs.debian.org
To: Lionel Elie Mamane <lionel@mamane.lu>
Cc: 298121@bugs.debian.org
Subject: Bug#298121: mutt: header cache patch should use realpath for mai=
ldir

Hello,

> Also consider symlinks in the path, etc. Really, your best approach as
> far as I understand is to use realpath() on the filename/path of the
> mailbox before md5-ing it.

yes, it is.

        Thomas

----- End forwarded message -----

Christoph
--=20
cb@df7cb.de | http://www.df7cb.de/

>Fix:
Unknown

Change History

Changed 21 months ago by brendan

  • status changed from new to closed
  • resolution set to fixed
Fixed in 18cd9834050d
Note: See TracTickets for help on using tickets.