diff options
author | Philippe Huibonhoa <phuibonhoa@gmail.com> | 2011-09-29 18:59:40 -0700 |
---|---|---|
committer | Philippe Huibonhoa <phuibonhoa@gmail.com> | 2011-09-29 18:59:40 -0700 |
commit | 0baa8f8604e7766ce627120dfe572e09c247ef8c (patch) | |
tree | 30ddc6e35037a6e1da75c6856cb8cab6a80e5072 /activesupport/lib | |
parent | d2888de5985c7018a5be23d44143ec3c6cef9032 (diff) | |
download | rails-0baa8f8604e7766ce627120dfe572e09c247ef8c.tar.gz rails-0baa8f8604e7766ce627120dfe572e09c247ef8c.tar.bz2 rails-0baa8f8604e7766ce627120dfe572e09c247ef8c.zip |
Added fix so that file store does not raise an exception when cache dir does not exist yet. This can happen if a delete_matched is called before anything is saved in the cache.
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/cache/file_store.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb index 3f516d4808..b431041b76 100644 --- a/activesupport/lib/active_support/cache/file_store.rb +++ b/activesupport/lib/active_support/cache/file_store.rb @@ -161,6 +161,7 @@ module ActiveSupport end def search_dir(dir, &callback) + return if !File.exist?(dir) Dir.foreach(dir) do |d| next if d == "." || d == ".." name = File.join(dir, d) |