Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-07-25 18:08:36 +0300
committerRémy Coutable <remy@rymai.me>2016-07-26 11:22:17 +0300
commit939436480c8c6bd524d3c4c78674e81f90861d06 (patch)
tree8b9dd288e6b0ddf31247b535833c23f74f3da2ea /app/models/commit.rb
parent4bf20d677b2ec3bffae9fe2ca1abbbc0429b6b28 (diff)
Ensure relative paths for video are rewritten as we do for images
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 2ef3973c160..f80f1063406 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -295,8 +295,8 @@ class Commit
def uri_type(path)
entry = @raw.tree.path(path)
if entry[:type] == :blob
- blob = Gitlab::Git::Blob.new(name: entry[:name])
- blob.image? ? :raw : :blob
+ blob = ::Blob.decorate(Gitlab::Git::Blob.new(name: entry[:name]))
+ blob.image? || blob.video? ? :raw : :blob
else
entry[:type]
end