Skip to content

Commit

Permalink
Added Errno::EEXIST to the list of expected errors while deleting emp…
Browse files Browse the repository at this point in the history
…ty directories.
  • Loading branch information
Jon Yurek committed Feb 8, 2009
1 parent 86d0ecd commit 54a1816
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/paperclip/storage.rb
Expand Up @@ -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}")
Expand Down
2 changes: 1 addition & 1 deletion test/integration_test.rb
Expand Up @@ -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
Expand Down

0 comments on commit 54a1816

Please sign in to comment.