<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -44,6 +44,9 @@ module Technoweenie # :nodoc:
             processor.render do |result|
               self.width  = result.extent.size.width  if respond_to?(:width)
               self.height = result.extent.size.height if respond_to?(:height)
+              
+              # Get a new temp_path for the image before saving
+              self.temp_path = Tempfile.new(random_tempfile_filename, Technoweenie::AttachmentFu.tempfile_path).path
               result.save self.temp_path, OSX::NSJPEGFileType
               self.size = File.size(self.temp_path)
             end</diff>
      <filename>lib/technoweenie/attachment_fu/processors/core_image_processor.rb</filename>
    </modified>
    <modified>
      <diff>@@ -22,6 +22,12 @@ class CoreImageTest &lt; Test::Unit::TestCase
       # test geometry string
       assert_equal 31, geo.width
       assert_equal 41, geo.height
+      
+      # This makes sure that we didn't overwrite the original file
+      # and will end up with a thumbnail instead of the original
+      assert_equal 42, attachment.width
+      assert_equal 55, attachment.height
+      
     end
   else
     def test_flunk</diff>
      <filename>test/processors/core_image_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>61ad36fb73de927ace41689999187076496934df</id>
    </parent>
  </parents>
  <author>
    <name>Marcus Crafter</name>
    <email>crafterm@redartisan.com</email>
  </author>
  <url>http://github.com/crafterm/attachment_fu/commit/834553ad3d876541b986ed6de115ea0023070bb5</url>
  <id>834553ad3d876541b986ed6de115ea0023070bb5</id>
  <committed-date>2008-05-21T20:47:59-07:00</committed-date>
  <authored-date>2008-05-21T20:47:59-07:00</authored-date>
  <message>Applied patch from Christoph Lupprich to correct file handling in core image processor for attachment fu: http://ar-code.lighthouseapp.com/projects/35/tickets/24-patch-coreimage-resizes-main-attachment-as-well-as-thumbnails</message>
  <tree>4a175a97a65b7c694f5cc496d4d4fc8880153e22</tree>
  <committer>
    <name>Marcus Crafter</name>
    <email>crafterm@redartisan.com</email>
  </committer>
</commit>
