merge from develop

This commit is contained in:
yystopf 2022-06-13 12:54:56 +08:00
commit dd03b9f147
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ module RepositoriesHelper
next if s_content.starts_with?('http://') || s_content.starts_with?('https://') || s_content.starts_with?('mailto:') || s_content.blank?
ext = File.extname(s_content)[1..-1]
if image_type?(ext) || download_type(ext)
if (image_type?(ext) || download_type(ext)) && !s_content.to_s.end_with?('/')
s_content = File.expand_path(s_content, file_path)
s_content = s_content.split("#{Rails.root}/")[1]
# content = content.gsub(s[0], "/#{s_content}")