NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/47577: Mail(1)/mail(1)/mailx(1) gets stuck when current folder becomes accessible
The following reply was made to PR bin/47577; it has been noted by GNATS.
From: Steffen "Daode" Nurpmeso <sdaoden%gmail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: bin/47577: Mail(1)/mail(1)/mailx(1) gets stuck when current
folder becomes accessible
Date: Mon, 18 Feb 2013 21:54:39 +0100
christos%zoulas.com@localhost (Christos Zoulas) wrote:
|| Sure; "fi" etc. then always show an absolute path, which is often
|| annoying imho, especially on 80 column terminals, though.
|=20
| So keep a "displayname" and a "resolvedname" so you always show the
| displayname. It is strange that the name will change when the user cds?
| Don't you agree?
I took a quick look, and i think it'll be more complicated.
I also think that my solution is too simple minded, for the
Berkeley codebase as such, at least because lex.c:newfileinfo()
tries to abbreviate folders which have the same path prefix as the
value of the *folder* option to "+BOX"; all this is thus
inherently broken ... so to say.
I'll continue tomorrow, but append a diff that fixes usage of an
inner-scope buffer that is used outside the scope.
| christos
--steffen
--- lex.c.orig 2013-02-18 17:38:31.000000000 +0100
+++ lex.c 2013-02-18 18:05:47.000000000 +0100
@@ -974,7 +974,7 @@ newfileinfo(int omsgCount)
{
struct message *mp;
int d, n, s, t, u, mdot;
- char fname[PATHSIZE];
+ char fname[PATHSIZE], zname[PATHSIZE];
char *ename;
=20
/*
@@ -1021,7 +1021,6 @@ newfileinfo(int omsgCount)
}
ename =3D mailname;
if (getfold(fname, sizeof(fname)) >=3D 0) {
- char zname[PATHSIZE];
size_t l;
l =3D strlen(fname);
if (l < sizeof(fname) - 1)
Home |
Main Index |
Thread Index |
Old Index