Project

General

Profile

バグ #1148 » 1148-file_path_mysterious-fix.diff

kagura1050 てお, 2018-02-10 20:42

View differences:

core/lib/diva_hacks.rb
56 56
  module DivaHacks; end
57 57
end
58 58

  
59
class Diva::URI
60
  alias_method :__generate_uri_by_string__, :generate_uri_by_string
61
  private
62
  def generate_uri_by_string
63
    if @uri_string.match(%r<\A\w+://>)
64
      uri = Addressable::URI.parse(@uri_string)
65
    else
66
      uri, = Plugin.filtering(:uri_filter, @uri_string)
67
    end
68
    uri
69
  end
70
  
71
  private :__generate_uri_by_string__
72
end
73

  
74

  
59 75
require_relative 'diva_hacks/model'
60 76
require_relative 'diva_hacks/mixin'
61 77
require_relative 'diva_hacks/entity'
core/mui/gtk_photo_pixbuf.rb
54 54
  # [nil] 画像がローカルにキャッシュされていない場合
55 55
  def pixbuf(width:, height:)
56 56
    result = pixbuf_cache[[width, height].hash]
57
    p uri.path
57 58
    if result
58 59
      result.read_count += 1
59 60
      result.reserver.cancel if result.reserver
    (1-1/1)