Commit 6d6f807b authored by Robert Speicher's avatar Robert Speicher

Merge branch 'fix-image-file-is-not-displayed' into 'master'

Update RelativeLinkFilter to support non-ASCII filenames

See merge request !1050
parents bd72b5bd 1cd28600
......@@ -3,6 +3,7 @@ Please view this file on the master branch, on stable branches it's out of date.
v 7.14.0 (unreleased)
- Fix network graph when branch name has single quotes (Stan Hu)
- Upgrade gitlab_git to version 7.2.6 to fix Error 500 when creating network graphs (Stan Hu)
- Fix the image file that contains non-ascii character is not displayed(Hiroyuki Sato)
- Fix URL used for refreshing notes if relative_url is present (Bartłomiej Święcki)
- Fix commit data retrieval when branch name has single quotes (Stan Hu)
- Check that project was actually created rather than just validated in import:repos task (Stan Hu)
......
......@@ -98,9 +98,10 @@ module Gitlab
#
# Returns a String
def path_type(path)
if repository.tree(current_sha, path).entries.any?
unescaped_path = Addressable::URI.unescape(path)
if repository.tree(current_sha, unescaped_path).entries.any?
'tree'
elsif repository.blob_at(current_sha, path).try(:image?)
elsif repository.blob_at(current_sha, unescaped_path).try(:image?)
'raw'
else
'blob'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment