bogoutil and realpath
David Relson <[email protected]>
| Newsgroups | gmane.mail.bogofilter.devel |
|---|---|
| Organization | Osage Software Systems, Inc. |
| Message-ID | <[email protected]> |
Matthias, Accessibility of the wordlist has been verified by bogoutil before dbe_init is called. Part of the success of this check should be to set bogohome (unless it's already set). Then, in dbe_init there are calls to realpath (which can generate error messages) and there's also a strcmp() when can generate a different message. Either of the messages is followed by an error exit. It seems like some refactoring is possible. For example, suppose checkpath() did all the checking and message printing and returned true/false. Then dbe_inint() could call checkpath () and error exit if appropriate. This division of labor would put all the checking logic in one place and make clear that the top level function is responsible for exit/no- exit. By the way, have you read the manpage of realpath? It says "do not use" :0 I'll experiment a bit and see where these ideas lead. David _______________________________________________ Bogofilter-dev mailing list [email protected] http://www.bogofilter.org/mailman/listinfo/bogofilter-dev