Permalink
Browse files

Added Errno::EEXIST to the list of expected errors while deleting emp…

…ty directories.
  • Loading branch information...
1 parent 86d0ecd commit 54a18162974afd96295be29d9fabf542c74d4e93 @jyurek jyurek committed Feb 8, 2009
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/paperclip/storage.rb
  2. +1 −1 test/integration_test.rb
View
@@ -61,7 +61,7 @@ def flush_deletes #:nodoc:
path = File.dirname(path)
FileUtils.rmdir(path)
end
- rescue Errno::ENOTEMPTY, Errno::ENOENT, Errno::EINVAL, Errno::ENOTDIR
+ rescue Errno::EEXIST, Errno::ENOTEMPTY, Errno::ENOENT, Errno::EINVAL, Errno::ENOTDIR
# Stop trying to remove parent directories
rescue SystemCallError => e
logger.info("[paperclip] There was an unexpected error while deleting directories: #{e.class}")
View
@@ -108,7 +108,7 @@ class IntegrationTest < Test::Unit::TestCase
end
before_should "not die if an unexpected SystemCallError happens" do
- FileUtils.stubs(:rmdir).raises(Errno::EEXIST)
+ FileUtils.stubs(:rmdir).raises(Errno::EPIPE)
end
end
end

0 comments on commit 54a1816

Please sign in to comment.