From: <de...@de...> - 2007-02-13 11:42:39
|
Author: CrawfordCurrie Date: 2007-02-13 05:42:36 -0600 (Tue, 13 Feb 2007) New Revision: 12854 Modified: twiki/branches/MAIN/lib/TWiki/Store/RcsFile.pm Log: Item3573: Item3622: grep search was not recognising backslash as a path separator, causing multifarious obscure effects Modified: twiki/branches/MAIN/lib/TWiki/Store/RcsFile.pm =================================================================== --- twiki/branches/MAIN/lib/TWiki/Store/RcsFile.pm 2007-02-13 11:41:57 UTC (rev 12853) +++ twiki/branches/MAIN/lib/TWiki/Store/RcsFile.pm 2007-02-13 11:42:36 UTC (rev 12854) @@ -345,7 +345,9 @@ my $matches = NativeTWikiSearch::cgrep(\@fs); if (defined($matches)) { for (@$matches) { - if (/([^\/]*)\.txt(:(.*))?$/) { + # Note use of / and \ as dir separators, to support + # Winblows + if (/([^\/\\]*)\.txt(:(.*))?$/) { push( @{$seen{$1}}, $3 ); } } @@ -415,7 +417,9 @@ $matches .= $m; @set = splice( @take, 0, $maxTopicsInSet ); } - $matches =~ s/([^\/]*)\.txt(:(.*))?$/push( @{$seen{$1}}, $3 ); ''/gem; + # Note use of / and \ as dir separators, to support + # Winblows + $matches =~ s/([^\/\\]*)\.txt(:(.*))?$/push( @{$seen{$1}}, $3 ); ''/gem; return \%seen; } |