spamassassin-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Malte S. Stretz" <msquadrat.nospample...@gmx.net>
Subject Re: svn commit: r106600 - /spamassassin/trunk/t/SATest.pm
Date Fri, 26 Nov 2004 20:50:52 GMT
On Friday 26 November 2004 21:42 CET Sidney Markowitz wrote:
> Malte S. Stretz wrote:
> > So maybe we should add a M::SA::Util::get_home() which first
> > tries $ENV{HOME}, then on Windows $ENV{HOMEDRIVE}\$ENV{HOMEDIR}, then
> > portable_getpwuid()[7], then... foo?
>
> portable_getpwuid() doesn't seem to do anything useful under Windows for
> this purpose and shouldn't be needed anyway. It just returns 'unknown'
> for the name, which works when you don't care about the actual user name.

Yeah, noticed that, too.

> The first two steps are fine, and probably enough, except that you would
>    not have to add the '\' separator, it is already in HOMEDIR.
>
> Question: In ArchiveIterator.pm does everything work if that is what it
> uses for HOME or does anything have to be done to convert \ to / ?

What do you think about the attached patch?  Try it with
perl -Ilib -MMail::SpamAssassin::Util \
  -le 'print Mail::SpamAssassin::Util::get_home()'

Cheers,
Malte

-- 
[SGT] Simon G. Tatham: "How to Report Bugs Effectively"
      <http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>
[ESR] Eric S. Raymond: "How To Ask Questions The Smart Way"
      <http://www.catb.org/~esr/faqs/smart-questions.html>

Mime
View raw message