From 32853ba070b186d1a3b8152f5b8441b17396cde5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Javier=20L=C3=B3pez?= Date: Wed, 30 May 2018 12:31:44 +0200 Subject: Aligning basename returned by find_by_content and find_by_filename --- lib/gitlab/file_finder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gitlab/file_finder.rb b/lib/gitlab/file_finder.rb index 8946b3a270b..f42088f980e 100644 --- a/lib/gitlab/file_finder.rb +++ b/lib/gitlab/file_finder.rb @@ -38,7 +38,7 @@ module Gitlab Gitlab::SearchResults::FoundBlob.new( id: blob.id, filename: blob.path, - basename: File.basename(blob.path), + basename: File.basename(blob.path, File.extname(blob.path)), ref: ref, startline: 1, data: blob.data, -- cgit v1.2.1