Re: Anybody mind if I remove this piece of strange code?
Robert Elz wrote: > | How about if I change the test so that it is only ignored for the top > | level directory? > > That would do much less harm, but is unlikely to be so easy (that function > gets called for any level in the hierarchy, if I recall correctly). > > An alternative would be a "try really hard" option (inverse of folder -fast) > that made it ignore the test. > > But for your purposes, wouldn't just making a dummy sub-directory in your new > (symlinks only) Mail directory, until it gets a real folder sub-dir of its own > do just as well? > > kre OK, I give up. I guess that this is a special case. But I found it real annoying to have to resort to the source code in order to find out why the command mysteriously didn't work. I think a warning on the manual page would suffice. Jon
Re: Anybody mind if I remove this piece of strange code?
Date:Mon, 20 Oct 2003 12:56:55 -0700 From:Jon Steinhart <[EMAIL PROTECTED]> Message-ID: <[EMAIL PROTECTED]> | How about if I change the test so that it is only ignored for the top | level directory? That would do much less harm, but is unlikely to be so easy (that function gets called for any level in the hierarchy, if I recall correctly). An alternative would be a "try really hard" option (inverse of folder -fast) that made it ignore the test. But for your purposes, wouldn't just making a dummy sub-directory in your new (symlinks only) Mail directory, until it gets a real folder sub-dir of its own do just as well? kre
Re: Anybody mind if I remove this piece of strange code?
Robert Elz writes: > | Anyone have a problem if I remove this test? > > Yes. > > It is that test that makes folder run in manageable time, without it, > every message in every folder has to be stat'd to see if it happens to > be a directory - with it, folders with no sub-folders (which almost all > folders with many messages count as) can simply be skipped. > > kre How about if I change the test so that it is only ignored for the top level directory? Jon
Re: Anybody mind if I remove this piece of strange code?
Jon Steinhart <[EMAIL PROTECTED]> wrote on Oct 20, 2003: > Problem is, >the folder command doesn't work because there are no subdirectories in the >mail directory, even though there are links to them. It is hard to imagine a Mail directory without at least one subdirectory (such as RCS). -NWR
Re: Anybody mind if I remove this piece of strange code?
[EMAIL PROTECTED] said: > Anyone have a problem if I remove this test? > Jon Not really. It might be worth to think about it twice though. I seem to recall reading in, was it the man mage for find(1)??, that this or a similar thing might speed up some types of directory structure traversals by quite a lot. Maybe that's ancient visdom too... /A
Re: Anybody mind if I remove this piece of strange code?
Date:Mon, 20 Oct 2003 11:06:08 -0700 From:Jon Steinhart <[EMAIL PROTECTED]> Message-ID: <[EMAIL PROTECTED]> | Anyone have a problem if I remove this test? Yes. It is that test that makes folder run in manageable time, without it, every message in every folder has to be stat'd to see if it happens to be a directory - with it, folders with no sub-folders (which almost all folders with many messages count as) can simply be skipped. kre
Anybody mind if I remove this piece of strange code?
There's a piece of code in addir (uip/folder.c) that seems well intended but causes problems. It's the stuff under the "short cut" comment below. static void addir (char *name) { int nlink; char *base, *cp; struct stat st; struct dirent *dp; DIR * dd; cp = name + strlen (name); *cp++ = '/'; *cp = '\0'; /* * A hack to skip over a leading * "./" in folder names. */ base = strcmp (name, "./") ? name : name + 2; /* short-cut to see if directory has any sub-directories */ if (stat (name, &st) != -1 && st.st_nlink == 2) return; ... I'm busy moving stuff around on my computers, and I made a Mail directory on a new machine and linked all of the folders to the old machine. Problem is, the folder command doesn't work because there are no subdirectories in the mail directory, even though there are links to them. This code is probably left over from before symbolic links were invented! Anyone have a problem if I remove this test? Jon