From: Pat Thoyts Date: Thu, 25 Feb 2010 11:10:26 +0000 (+0000) Subject: Fix the path_filter to accept . as a current directory prefix X-Git-Url: http://privyetmir.co.uk/gitweb?a=commitdiff_plain;h=497c6cfed20cdc858eef849461838553f5013440;p=gitk Fix the path_filter to accept . as a current directory prefix Signed-off-by: Pat Thoyts --- diff --git a/gitk b/gitk index 7f573e0..75a4e1d 100755 --- a/gitk +++ b/gitk @@ -7339,19 +7339,12 @@ proc startdiff {ids} { } proc path_filter {filter name} { + set name [file normalize $name] foreach p $filter { - set l [string length $p] - if {[string index $p end] eq "/"} { - if {[string compare -length $l $p $name] == 0} { - return 1 - } - } else { - if {[string compare -length $l $p $name] == 0 && - ([string length $name] == $l || - [string index $name $l] eq "/")} { - return 1 - } - } + set p [file normalize $p] + if {[string equal $p $name] || [string match $p* $name]} { + return 1 + } } return 0 }