summaryrefslogtreecommitdiff
path: root/app/helpers/tree_helper.rb
diff options
context:
space:
mode:
authorzzjin <tczzjin@gmail.com>2017-05-10 14:05:03 +0800
committerzzjin <tczzjin@gmail.com>2017-05-10 14:05:03 +0800
commit2e62ec86e5ce95d4e7c8eba2d95a8c76a32e9a3a (patch)
tree2b3756fed62e8e0a343c99bdeb1197d958d0b33e /app/helpers/tree_helper.rb
parente9ba667282674bce875934be8aae6588d0bd69e3 (diff)
downloadgitlab-ce-2e62ec86e5ce95d4e7c8eba2d95a8c76a32e9a3a.tar.gz
update yield to return string path
Diffstat (limited to 'app/helpers/tree_helper.rb')
-rw-r--r--app/helpers/tree_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb
index 3da58a91d53..e0d3e9b88f3 100644
--- a/app/helpers/tree_helper.rb
+++ b/app/helpers/tree_helper.rb
@@ -81,7 +81,7 @@ module TreeHelper
part_path = ""
parts = @path.split('/')
- yield('..', parts) if parts.count > max_links
+ yield('..', File.join(*parts.first(parts.count - 2))) if parts.count > max_links
parts.each do |part|
part_path = File.join(part_path, part) unless part_path.empty?