summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Javier López <fjlopez@gitlab.com>2018-05-30 12:31:44 +0200
committerFrancisco Javier López <fjlopez@gitlab.com>2018-05-31 21:09:12 +0200
commit32853ba070b186d1a3b8152f5b8441b17396cde5 (patch)
treecfdacf301d25e5d7e3d7d1656f63c86db576c814
parent0712b8e2f4f718a6fcbaa8bd42add3ce6b674767 (diff)
downloadgitlab-ce-32853ba070b186d1a3b8152f5b8441b17396cde5.tar.gz
Aligning basename returned by find_by_content and find_by_filename
-rw-r--r--lib/gitlab/file_finder.rb2
1 files changed, 1 insertions, 1 deletions
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,