Re: [Mutt] #2851: cannot attach files in dirs with a "cur"
#2851: cannot attach files in dirs with a "cur" subdirectory
Old description:
> {{{
>
> This is a pretty weird one, but anyway, it's a bug...
>
> ----- Forwarded message from Thomas Poindessous <thomas@xxxxxxxxxxxxxxx>
> =
> -----
>
> Date: Wed, 29 Jan 2003 12:04:24 +0100
> From: Thomas Poindessous <thomas@xxxxxxxxxxxxxxx>
> Reply-To: Thomas Poindessous <thomas@xxxxxxxxxxxxxxx>,
> 178899@xxxxxxxxxxxxxxx
> To: Debian Bug Tracking System <submit@xxxxxxxxxxxxxxx>
> Subject: Bug#178899: mutt: When adding a attachment, I can't go in a
> dire=
> ctory which name is less than 4
> char long
>
> Package: mutt
> Version: 1.5.3-1
> Severity: normal
>
> Hi,
> when I wnat to add a attachment, I can't go in a directory which name is
> less than 4 char long.
>
> For example, I want to add the file :
>
> /tmp/t/cur/toto
>
> and find /tmp/t/ :
> /tmp/t
> /tmp/t/cur
> /tmp/t/cur/toto
>
> so there is only one file.
>
> I can't go to /tmp/t/cur
> [...]
>
> ----- End forwarded message -----
> ----- Forwarded message from Thomas Poindessous <thomas@xxxxxxxxxxxxxxx>
> =
> -----
>
> Date: Wed, 29 Jan 2003 15:28:18 +0100
> From: Thomas Poindessous <thomas@xxxxxxxxxxxxxxx>
> Reply-To: Thomas Poindessous <thomas@xxxxxxxxxxxxxxx>,
> 178899@xxxxxxxxxxxxxxx
> To: Marco d'Itri <md@xxxxxxxx>, 178899@xxxxxxxxxxxxxxx
> Subject: Bug#178899: mutt: When adding a attachment, I can't go in a
> dire=
> ctory which name is less than 4
> char long
>
> On Wednesday 29 January 2003 13:46, Marco d'Itri wrote:
> > tag 178899 unreproducible moreinfo
> > thanks
> >
> > On Jan 29, Thomas Poindessous <thomas@xxxxxxxxxxxxxxx> wrote:
> > >when I wnat to add a attachment, I can't go in a directory which
> name=
> is
> > >less than 4 char long.
> >
> > I cannot reproduce this.
>
> In fact, I found the bug.
>
> The directory is named cur, and mutt tried to determine if it's a
> maildir=
> or=20
> not. (it is, in fact)
>
> To me, it seems that the test in mx.c:390
>
> snprintf (tmp, sizeof (tmp), "%s/cur", path);
> if (stat (tmp, &st) =3D=3D 0 && S_ISDIR (st.st_mode))
> return (M_MAILDIR);
>
> doesn't work, I tried to put a breakpoint on the "if ..." line with ddd,
> =
> and=20
> it doesn't work. In this case, it should return M_MAILDIR
>
> --=20
> Thomas Poindessous
>
> ----- End forwarded message -----
> ----- Forwarded message from Adeodato Sim=F3 <asp16@xxxxxxxxx> -----
>
> Date: Sun, 23 May 2004 21:36:30 +0200
> From: Adeodato Sim=F3 <asp16@xxxxxxxxx>
> Reply-To: Adeodato Sim=F3 <asp16@xxxxxxxxx>, 178899@xxxxxxxxxxxxxxx
> To: Thomas Poindessous <thomas@xxxxxxxxxxxxxxx>, 178899@xxxxxxxxxxxxxxx
> Subject: Bug#178899: mutt: When adding a attachment, I can't go in a
> dire=
> ctory which name is less than 4
> char long
>
> * Thomas Poindessous [Wed, 29 Jan 2003 15:28:18 +0100]:
>
> > In fact, I found the bug.
>
> > The directory is named cur, and mutt tried to determine if it's a
> maild=
> ir or=20
> > not. (it is, in fact)
>
> > To me, it seems that the test in mx.c:390
>
> > snprintf (tmp, sizeof (tmp), "%s/cur", path);
> > if (stat (tmp, &st) =3D=3D 0 && S_ISDIR (st.st_mode))
> > return (M_MAILDIR);
>
> > doesn't work, I tried to put a breakpoint on the "if ..." line with
> ddd=
> , and=20
> > it doesn't work. In this case, it should return M_MAILDIR
>
> mmm, it *does* work. if it exists dir/cur, mutt thinks it's a maildir
> and it won't let you browse it as a normal folder. if you want to
> attach a message, you can use the attach message (binded to 'A' key)
> function.
>
> real trouble is when you have a directory (not a maildir) with a
> directory named 'cur' under it. but that seems odd.
>
> what do we do with this bug?
>
> --=20
> Adeodato Sim=F3
> EM: asp16 [ykwim] alu.ua.es | PK: DA6AE621
> =20
> Under capitalism, man exploits man.
> Under communism, it's just the opposite.
> -- J.K. Galbraith
>
> ----- End forwarded message -----
>
> Christoph
> --=20
> cb@xxxxxxxx | http://www.df7cb.de/
>
> >Fix:
>
> Unknown
> }}}
New description:
{{{
This is a pretty weird one, but anyway, it's a bug...
----- Forwarded message from Thomas Poindessous <thomas@xxxxxxxxxxxxxxx> =
-----
Date: Wed, 29 Jan 2003 12:04:24 +0100
From: Thomas Poindessous <thomas@xxxxxxxxxxxxxxx>
Reply-To: Thomas Poindessous <thomas@xxxxxxxxxxxxxxx>,
178899@xxxxxxxxxxxxxxx
To: Debian Bug Tracking System <submit@xxxxxxxxxxxxxxx>
Subject: Bug#178899: mutt: When adding a attachment, I can't go in a dire=
ctory which name is less than 4
char long
Package: mutt
Version: 1.5.3-1
Severity: normal
Hi,
when I wnat to add a attachment, I can't go in a directory which name is
less than 4 char long.
For example, I want to add the file :
/tmp/t/cur/toto
and find /tmp/t/ :
/tmp/t
/tmp/t/cur
/tmp/t/cur/toto
so there is only one file.
I can't go to /tmp/t/cur
[...]
----- End forwarded message -----
----- Forwarded message from Thomas Poindessous <thomas@xxxxxxxxxxxxxxx> =
-----
Date: Wed, 29 Jan 2003 15:28:18 +0100
From: Thomas Poindessous <thomas@xxxxxxxxxxxxxxx>
Reply-To: Thomas Poindessous <thomas@xxxxxxxxxxxxxxx>,
178899@xxxxxxxxxxxxxxx
To: Marco d'Itri <md@xxxxxxxx>, 178899@xxxxxxxxxxxxxxx
Subject: Bug#178899: mutt: When adding a attachment, I can't go in a dire=
ctory which name is less than 4
char long
On Wednesday 29 January 2003 13:46, Marco d'Itri wrote:
> tag 178899 unreproducible moreinfo
> thanks
>
> On Jan 29, Thomas Poindessous <thomas@xxxxxxxxxxxxxxx> wrote:
> >when I wnat to add a attachment, I can't go in a directory which name=
is
> >less than 4 char long.
>
> I cannot reproduce this.
In fact, I found the bug.
The directory is named cur, and mutt tried to determine if it's a maildir=
or=20
not. (it is, in fact)
To me, it seems that the test in mx.c:390
snprintf (tmp, sizeof (tmp), "%s/cur", path);
if (stat (tmp, &st) =3D=3D 0 && S_ISDIR (st.st_mode))
return (M_MAILDIR);
doesn't work, I tried to put a breakpoint on the "if ..." line with ddd, =
and=20
it doesn't work. In this case, it should return M_MAILDIR
--=20
Thomas Poindessous
----- End forwarded message -----
----- Forwarded message from Adeodato Sim=F3 <asp16@xxxxxxxxx> -----
Date: Sun, 23 May 2004 21:36:30 +0200
From: Adeodato Sim=F3 <asp16@xxxxxxxxx>
Reply-To: Adeodato Sim=F3 <asp16@xxxxxxxxx>, 178899@xxxxxxxxxxxxxxx
To: Thomas Poindessous <thomas@xxxxxxxxxxxxxxx>, 178899@xxxxxxxxxxxxxxx
Subject: Bug#178899: mutt: When adding a attachment, I can't go in a dire=
ctory which name is less than 4
char long
* Thomas Poindessous [Wed, 29 Jan 2003 15:28:18 +0100]:
> In fact, I found the bug.
> The directory is named cur, and mutt tried to determine if it's a maild=
ir or=20
> not. (it is, in fact)
> To me, it seems that the test in mx.c:390
> snprintf (tmp, sizeof (tmp), "%s/cur", path);
> if (stat (tmp, &st) =3D=3D 0 && S_ISDIR (st.st_mode))
> return (M_MAILDIR);
> doesn't work, I tried to put a breakpoint on the "if ..." line with ddd=
, and=20
> it doesn't work. In this case, it should return M_MAILDIR
mmm, it *does* work. if it exists dir/cur, mutt thinks it's a maildir
and it won't let you browse it as a normal folder. if you want to
attach a message, you can use the attach message (binded to 'A' key)
function.
real trouble is when you have a directory (not a maildir) with a
directory named 'cur' under it. but that seems odd.
what do we do with this bug?
--=20
Adeodato Sim=F3
EM: asp16 [ykwim] alu.ua.es | PK: DA6AE621
=20
Under capitalism, man exploits man.
Under communism, it's just the opposite.
-- J.K. Galbraith
----- End forwarded message -----
Christoph
--=20
cb@xxxxxxxx | http://www.df7cb.de/
>Fix:
Unknown
}}}
Comment (by me):
Do we need a function specifically to force entering a directory when it
would otherwise be considered a mailbox? I don't see any other way around
this.
--
Ticket URL: <http://dev.mutt.org/trac/ticket/2851#comment:1>