Sha256: 0f6804ab8906747a741b6012a3fccbc822c3f75e9b7e4e4afce653f7bf634c91

Contents?: true

Size: 342 Bytes

Versions: 52

Compression:

Stored size: 342 Bytes

Contents

# This patches the windows tempfile problem that attachment_fu depends on. See:
# http://epirsch.blogspot.com/2008/01/fixing-attachmentfu-on-windows-like.html

require 'tempfile'

class Tempfile
  def size
    if @tmpfile
      @tmpfile.fsync # added this line
      @tmpfile.flush
      @tmpfile.stat.size
    else
      0
    end
  end
end

Version data entries

52 entries across 52 versions & 2 rubygems

Version Path
refinerycms-0.9.8.9 vendor/refinerycms/core/lib/refinery/attachment_fu_patch.rb
refinerycms-0.9.8.8 vendor/refinerycms/core/lib/refinery/attachment_fu_patch.rb
refinerycms-0.9.8.7 vendor/refinerycms/core/lib/refinery/attachment_fu_patch.rb
refinerycms-0.9.8.6 vendor/refinerycms/core/lib/refinery/attachment_fu_patch.rb
refinerycms-0.9.7.15 vendor/plugins/refinery/lib/refinery/attachment_fu_patch.rb
refinerycms-0.9.7.14 vendor/plugins/refinery/lib/refinery/attachment_fu_patch.rb
refinerycms-0.9.8.5 vendor/refinerycms/core/lib/refinery/attachment_fu_patch.rb
refinerycms-0.9.8.4 vendor/refinerycms/core/lib/refinery/attachment_fu_patch.rb
refinerycms-0.9.8.3 vendor/refinerycms/core/lib/refinery/attachment_fu_patch.rb
refinerycms-0.9.8.2 vendor/refinerycms/core/lib/refinery/attachment_fu_patch.rb
refinerycms-0.9.8.1 vendor/refinerycms/core/lib/refinery/attachment_fu_patch.rb
refinerycms-0.9.8 vendor/refinerycms/core/lib/refinery/attachment_fu_patch.rb
refinerycms-0.9.7.13 vendor/plugins/refinery/lib/refinery/attachment_fu_patch.rb
refinerycms-0.9.7.11 vendor/plugins/refinery/lib/refinery/attachment_fu_patch.rb
refinerycms-0.9.7.10 vendor/plugins/refinery/lib/refinery/attachment_fu_patch.rb
refinerycms-0.9.7.9 vendor/plugins/refinery/lib/refinery/attachment_fu_patch.rb
refinerycms-0.9.7.8 vendor/plugins/refinery/lib/refinery/attachment_fu_patch.rb
refinerycms-0.9.7.7 vendor/plugins/refinery/lib/refinery/attachment_fu_patch.rb
refinerycms-0.9.7.6 vendor/plugins/refinery/lib/refinery/attachment_fu_patch.rb
refinerycms-0.9.7.5 vendor/plugins/refinery/lib/refinery/attachment_fu_patch.rb