diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-05-10 13:29:20 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-05-10 13:29:20 +0000 |
commit | b9a4b3487d4e961f60ea9d9789bc2cb0f77bcb7b (patch) | |
tree | 648a26bf841cac368050613e2a7bfb50ecb41ff2 | |
parent | 09c2aab4aa4661b147545e2c41b6a0100fc57b11 (diff) | |
parent | 2e62ec86e5ce95d4e7c8eba2d95a8c76a32e9a3a (diff) | |
download | gitlab-ce-b9a4b3487d4e961f60ea9d9789bc2cb0f77bcb7b.tar.gz |
Merge branch 'patch-5' into 'master'
Update tree_helper.rb to fix #31784, which broken file browse where paths deeper than 6:'/'.
Closes #31784
See merge request !11197
-rw-r--r-- | app/helpers/tree_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb index a91e3da309c..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('..', nil) 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? |