Fix the build.

Fix the build.

diff --git a/app/models/post.rb b/app/models/post.rb
index b4edb7b..c579d01 100644
--- a/app/models/post.rb
+++ b/app/models/post.rb
@@ -896,17 +896,16 @@ class Post < ActiveRecord::Base
 
     fragments ||= Nokogiri::HTML::fragment(self.cooked)
     links = fragments.css("a/@href", "img/@src").map { |media| media.value }.uniq
-    local_store = FileStore::LocalStore.new
 
     links.each do |src|
       next if src.blank? || upload_patterns.none? { |pattern| src.split("?")[0] =~ pattern }
       next if Rails.configuration.multisite && src.exclude?(current_db) && src.exclude?("short-url")
 
       src = "#{SiteSetting.force_https ? "https" : "http"}:#{src}" if src.start_with?("//")
-      next unless Discourse.store.has_been_uploaded?(src) || (include_local_upload && (src =~ /\A\/[^\/]/i || local_store.has_been_uploaded?(src)))
+      next unless Discourse.store.has_been_uploaded?(src) || (include_local_upload && src =~ /\A\/[^\/]/i)
 
       path = begin
-        URI(URI.unescape(src.gsub(GlobalSetting.cdn_url, "")))&.path
+        URI(URI.unescape(src))&.path
       rescue URI::Error
       end

GitHub sha: ef462312

This would be a good candidate for a more detailed commit message. How does this fix the build? What was the previous mistake?

1 Like