Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-05-10 16:29:20 +0300
committerDouwe Maan <douwe@gitlab.com>2017-05-10 16:29:20 +0300
commitb9a4b3487d4e961f60ea9d9789bc2cb0f77bcb7b (patch)
tree648a26bf841cac368050613e2a7bfb50ecb41ff2 /app
parent09c2aab4aa4661b147545e2c41b6a0100fc57b11 (diff)
parent2e62ec86e5ce95d4e7c8eba2d95a8c76a32e9a3a (diff)
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
Diffstat (limited to 'app')
-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 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?