summaryrefslogtreecommitdiff
path: root/lib/gitlab/template/finders/repo_template_finder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/template/finders/repo_template_finder.rb')
-rw-r--r--lib/gitlab/template/finders/repo_template_finder.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/template/finders/repo_template_finder.rb b/lib/gitlab/template/finders/repo_template_finder.rb
index 9140ace879f..b92cefefb8f 100644
--- a/lib/gitlab/template/finders/repo_template_finder.rb
+++ b/lib/gitlab/template/finders/repo_template_finder.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
# Searches and reads files present on each GitLab project repository
module Gitlab
module Template
@@ -33,7 +35,7 @@ module Gitlab
def list_files_for(dir)
return [] unless @commit
- dir << '/' unless dir.end_with?('/')
+ dir = "#{dir}/" unless dir.end_with?('/')
entries = @repository.tree(:head, dir).entries