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
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.
|
| 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;
/*
@@ -1021,7 +1021,6 @@ newfileinfo(int omsgCount)
}
ename = mailname;
if (getfold(fname, sizeof(fname)) >= 0) {
- char zname[PATHSIZE];
size_t l;
l = strlen(fname);
if (l < sizeof(fname) - 1)
Home |
Main Index |
Thread Index |
Old Index