Skip to content

Commit

Permalink
don't copy the #full_filename to the default #temp_paths array if it …
Browse files Browse the repository at this point in the history
…doesn't exist

git-svn-id: http://svn.techno-weenie.net/projects/plugins/attachment_fu@2834 567b1171-46fb-0310-a4c9-b4bef9110e78
  • Loading branch information
technoweenie committed Apr 3, 2007
1 parent 66548c0 commit 6394c42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
@@ -1,5 +1,6 @@
* April 2, 2007 *

* don't copy the #full_filename to the default #temp_paths array if it doesn't exist
* add default ID partitioning for attachments
* add #binmode call to Tempfile (note: ruby should be doing this!) [Eric Beland]
* Check for current type of :thumbnails option.
Expand Down
2 changes: 1 addition & 1 deletion lib/technoweenie/attachment_fu.rb
Expand Up @@ -273,7 +273,7 @@ def temp_path

# Gets an array of the currently used temp paths. Defaults to a copy of #full_filename.
def temp_paths
@temp_paths ||= new_record? ? [] : [copy_to_temp_file(full_filename)]
@temp_paths ||= (new_record? || !File.exist?(full_filename)) ? [] : [copy_to_temp_file(full_filename)]
end

# Adds a new temp_path to the array. This should take a string or a Tempfile. This class makes no
Expand Down

0 comments on commit 6394c42

Please sign in to comment.