diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-05-10 13:29:20 +0000 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2017-05-18 14:08:17 +0000 |
commit | f57218411f9f45771f41c50399aa0d9507893749 (patch) | |
tree | 1529736705b4904425f6b315e60a55d9336eec19 | |
parent | 1a32193f6613ab79e6e35b9bbd3f36ef84051372 (diff) | |
download | gitlab-ce-f57218411f9f45771f41c50399aa0d9507893749.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? |