https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8050

Sidney Markowitz <sid...@sidney.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sid...@sidney.com

--- Comment #5 from Sidney Markowitz <sid...@sidney.com> ---
Henrik, this isn't the change you did, but how is this existing code correct in
the line "if ($home && $home ne $prev)"?

  my $prev = '';
  if ($self->{home_dir_for_helpers}) {
    my $dir = File::Spec->catdir($self->{home_dir_for_helpers},
".spamassassin");
    $self->test_global_state_dir($dir);
    $prev = $dir;
  }
  if (!$self->{global_state_dir}) {
    my $home = (Mail::SpamAssassin::Util::portable_getpwuid ($>))[7];
    # home_dir_for_helpers default == home, skip if checked already..           
    if ($home && $home ne $prev) {
      my $dir = File::Spec->catdir($home, ".spamassassin");
      $self->test_global_state_dir($dir);
    }
  }

Doesn't it have to be more like

    # home_dir_for_helpers default == home, skip if checked already..           
    if ($home) {
      my $dir = File::Spec->catdir($home, ".spamassassin");
      $self->test_global_state_dir($dir) if ($dir ne $prev);
    }

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to