Commit 54a18162 by Jon Yurek

Added Errno::EEXIST to the list of expected errors while deleting empty directories.

parent 86d0ecdf
...@@ -61,7 +61,7 @@ module Paperclip ...@@ -61,7 +61,7 @@ module Paperclip
path = File.dirname(path) path = File.dirname(path)
FileUtils.rmdir(path) FileUtils.rmdir(path)
end 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 # Stop trying to remove parent directories
rescue SystemCallError => e rescue SystemCallError => e
logger.info("[paperclip] There was an unexpected error while deleting directories: #{e.class}") logger.info("[paperclip] There was an unexpected error while deleting directories: #{e.class}")
......
...@@ -108,7 +108,7 @@ class IntegrationTest < Test::Unit::TestCase ...@@ -108,7 +108,7 @@ class IntegrationTest < Test::Unit::TestCase
end end
before_should "not die if an unexpected SystemCallError happens" do 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 end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment