summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/internal.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/internal.rb b/lib/api/internal.rb
index 180e50611cf..a999cff09c0 100644
--- a/lib/api/internal.rb
+++ b/lib/api/internal.rb
@@ -25,8 +25,8 @@ module API
# project. This applies the correct project permissions to
# the wiki repository as well.
access =
- if project_path =~ /\.wiki\Z/
- project_path.sub!(/\.wiki\Z/, '')
+ if project_path.end_with?('.wiki')
+ project_path.chomp!('.wiki')
Gitlab::GitAccessWiki.new
else
Gitlab::GitAccess.new