summaryrefslogtreecommitdiff
path: root/app/helpers/tree_helper.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-12-16 13:44:50 +0100
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-12-16 13:44:50 +0100
commit40104746d6418b54cd80726d77c05e85cf2ddbb3 (patch)
treeaaa9bd256a8fefc7fb9dfcbe123dc869550dfb71 /app/helpers/tree_helper.rb
parent5ffed49fef07a06f46f7e4e3511d7f6b9f378892 (diff)
parent907209821590efc34b11b60a042c6554bd11897f (diff)
downloadgitlab-ce-40104746d6418b54cd80726d77c05e85cf2ddbb3.tar.gz
Merge remote-tracking branch 'origin/feature/update-rubocop'
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 886a1e734b5..f448dd0ab61 100644
--- a/app/helpers/tree_helper.rb
+++ b/app/helpers/tree_helper.rb
@@ -79,7 +79,7 @@ module TreeHelper
part_path = File.join(part_path, part) unless part_path.empty?
part_path = part if part_path.empty?
- next unless parts.last(2).include?(part) if parts.count > max_links
+ next if parts.count > max_links && !parts.last(2).include?(part)
yield(part, tree_join(@ref, part_path))
end
end