Merge git://ozlabs.org/~paulus/gitk
[gitweb.git] / git-gui / lib / browser.tcl
index a8c622351167be937b9f02df149a1a6ec2a16e98..0328338fda22c90c674630e0351982ff1bb2fbc4 100644 (file)
@@ -26,8 +26,14 @@ constructor new {commit {path {}}} {
        wm withdraw $top
        wm title $top [append "[appname] ([reponame]): " [mc "File Browser"]]
 
+       if {$path ne {}} {
+               if {[string index $path end] ne {/}} {
+                       append path /
+               }
+       }
+
        set browser_commit $commit
-       set browser_path $browser_commit:$path
+       set browser_path "$browser_commit:[escape_path $path]"
 
        ${NS}::label $w.path \
                -textvariable @browser_path \