From: <de...@de...> - 2017-05-30 06:27:49
|
Author: HideyoImazu Date: 2017-05-30 06:18:53 +0000 (Tue, 30 May 2017) New Revision: 30341 Trac url: http://develop.twiki.org/trac/changeset/30341 Modified: twiki/trunk/core/lib/TWiki/Store/RcsFile.pm Log: Item7812: TWiki::Store::RcsFile::hidePath() hiding too much Modified: twiki/trunk/core/lib/TWiki/Store/RcsFile.pm =================================================================== --- twiki/trunk/core/lib/TWiki/Store/RcsFile.pm 2017-05-30 00:55:21 UTC (rev 30340) +++ twiki/trunk/core/lib/TWiki/Store/RcsFile.pm 2017-05-30 06:18:53 UTC (rev 30341) @@ -1267,6 +1267,15 @@ # messages sub hidePath { my ( $this, $erf ) = @_; + my $len = length($this->{dataDir}); + if ( substr($erf, 0, $len) eq $this->{dataDir} ) { + return '...' . substr($erf, $len); + } + $len = length($this->{pubDir}); + if ( substr($erf, 0, $len) eq $this->{pubDir} ) { + return '...' . substr($erf, $len); + } + # probably not reaching here but leaving it as the last resort $erf =~ s#.*(/\w+/\w+\.[\w,]*)$#...$1#; return $erf; } |