From: <de...@de...> - 2017-05-30 06:29:24
|
Author: HideyoImazu Date: 2017-05-30 06:20:28 +0000 (Tue, 30 May 2017) New Revision: 30342 Trac url: http://develop.twiki.org/trac/changeset/30342 Modified: twiki/branches/TWikiRelease06x00/core/lib/TWiki/Store/RcsFile.pm Log: Item7812: TWiki::Store::RcsFile::hidePath() hiding too much Modified: twiki/branches/TWikiRelease06x00/core/lib/TWiki/Store/RcsFile.pm =================================================================== --- twiki/branches/TWikiRelease06x00/core/lib/TWiki/Store/RcsFile.pm 2017-05-30 06:18:53 UTC (rev 30341) +++ twiki/branches/TWikiRelease06x00/core/lib/TWiki/Store/RcsFile.pm 2017-05-30 06:20:28 UTC (rev 30342) @@ -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; } |