1. Diab Jerius
  2. wikiup

Commits

Diab Jerius  committed 964768a

clean up return value of URI->path_segments for paths with no segments so matching works better

  • Participants
  • Parent commits 195afed
  • Branches default

Comments (0)

Files changed (1)

File src/wikiup.pl.in

View file
 	    # now check path segments and record the maximum number of
 	    # leading segments which matched.
 
+	    # path_segments returns an extra empty segment if there
+	    # are no segments.
 	    my @psegs = $puri->path_segments;
+	    pop @psegs
+	      if @psegs == 2 && $psegs[0] eq '' && $psegs[1] eq '';
 
 	    my $nsegs = @segs > @psegs ? @psegs : @segs;