From ab1e4f7b0b9de85e0c9decf061d2ef5c1dc0feaa Mon Sep 17 00:00:00 2001 From: Mark Guzman Date: Fri, 27 Feb 2009 00:05:13 -0500 Subject: [PATCH] helps if everything refers to fileutils --- .../attachment_fu/backends/file_system_backend.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/technoweenie/attachment_fu/backends/file_system_backend.rb b/lib/technoweenie/attachment_fu/backends/file_system_backend.rb index 04ea8a34..352cd311 100644 --- a/lib/technoweenie/attachment_fu/backends/file_system_backend.rb +++ b/lib/technoweenie/attachment_fu/backends/file_system_backend.rb @@ -110,8 +110,8 @@ def save_to_storage if save_attachment? # TODO: This overwrites the file if it exists, maybe have an allow_overwrite option? FileUtils.mkdir_p(File.dirname(full_filename)) - File.cp(temp_path, full_filename) - File.chmod(attachment_options[:chmod] || 0644, full_filename) + FileUtils.cp(temp_path, full_filename) + FileUtils.chmod(attachment_options[:chmod] || 0644, full_filename) end @old_filename = nil true