diff options
author | Eric Wong <e@80x24.org> | 2021-08-11 11:26:18 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-08-11 21:50:09 +0000 |
commit | 5634e8331cb8782944a258a12e1f9857dfb1c8e1 (patch) | |
tree | a93419e9ad7690e246928910cab6b39bb471a84a /lib/PublicInbox/LeiALE.pm | |
parent | d15e80db44399867d8ca53528e38f70f54562b88 (diff) | |
download | public-inbox-5634e8331cb8782944a258a12e1f9857dfb1c8e1.tar.gz |
As documented, File::Spec->canonpath does not canonicalize "/../". While we want to do our best to preserve symlinks in pathnames, leaving "/../" can mislead our inotify|kqueue usage.
Diffstat (limited to 'lib/PublicInbox/LeiALE.pm')
-rw-r--r-- | lib/PublicInbox/LeiALE.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/PublicInbox/LeiALE.pm b/lib/PublicInbox/LeiALE.pm index cb570ab4..cc9a2095 100644 --- a/lib/PublicInbox/LeiALE.pm +++ b/lib/PublicInbox/LeiALE.pm @@ -33,7 +33,7 @@ sub new { for my $loc ($lei->externals_each) { # locals only $lxs->prepare_external($loc) if -d $loc; } - $self->refresh_externals($lxs); + $self->refresh_externals($lxs, $lei); $self; } @@ -50,7 +50,7 @@ sub overs_all { # for xoids_for (called only in lei workers?) } sub refresh_externals { - my ($self, $lxs) = @_; + my ($self, $lxs, $lei) = @_; $self->git->cleanup; my $lk = $self->lock_for_scope; my $cur_lxs = ref($lxs)->new; @@ -72,7 +72,7 @@ sub refresh_externals { } my @ibxish = $cur_lxs->locals; for my $x ($lxs->locals) { - my $d = File::Spec->canonpath($x->{inboxdir} // $x->{topdir}); + my $d = $lei->canonpath_harder($x->{inboxdir} // $x->{topdir}); $seen_ibxish{$d} //= do { $new .= "$d\n"; push @ibxish, $x; @@ -95,7 +95,7 @@ sub refresh_externals { $old = <$fh> // die "readline($f): $!"; } for my $x (@ibxish) { - $new .= File::Spec->canonpath($x->git->{git_dir})."/objects\n"; + $new .= $lei->canonpath_harder($x->git->{git_dir})."/objects\n"; } $self->{ibxish} = \@ibxish; return if $old eq $new; |