From b6c13f2d70eaa02f264281f34b518b4e9a6d41c6 Mon Sep 17 00:00:00 2001
From: Jamis Buck <jamis@37signals.com>
Date: Mon, 30 May 2005 07:05:52 +0000
Subject: Don't die when an attempt to delete a cache fails

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1365 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
---
 actionpack/lib/action_controller/caching.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'actionpack')

diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb
index 55a4b77fda..53ec03a7a4 100644
--- a/actionpack/lib/action_controller/caching.rb
+++ b/actionpack/lib/action_controller/caching.rb
@@ -375,7 +375,9 @@ module ActionController #:nodoc:
         end
 
         def delete(name, options) #:nodoc:
-          File.delete(real_file_path(name)) if File.exist?(real_file_path(name))
+          File.delete(real_file_path(name))
+        rescue SystemCallError => e
+          Base.logger.info "Couldn't expire cache #{name} (#{e.message})" unless Base.logger.nil?
         end
 
         def delete_matched(matcher, options) #:nodoc:
-- 
cgit v1.2.3