Since we don't have *at() syscalls readily available to us,
lei-daemon may call ->poke_dst in the wrong relative directory.
Despite not having *at() syscalls, we can still capture the
"$MAILDIR/cur" directory handle at pre_augment time so we can
reliably call futimes(2) on it using the `utime' perlop.
File::Path::mkpath($d);
-d $d or die "$d is not a directory";
}
File::Path::mkpath($d);
-d $d or die "$d is not a directory";
}
+ # for utime, so no opendir
+ open $self->{poke_dh}, '<', "${dst}cur" or die "open ${dst}cur: $!";
}
sub _do_augment_maildir {
}
sub _do_augment_maildir {
my ($self) = @_;
if ($self->{base_type} eq 'maildir') {
my $t = time + 1;
my ($self) = @_;
if ($self->{base_type} eq 'maildir') {
my $t = time + 1;
- utime($t, $t, $self->{dst} . 'cur');
+ utime($t, $t, $self->{poke_dh}) or warn "futimes: $!";