Permalink
Browse files

Works around FileUtils.rmdir issue in 1.9.2

  • Loading branch information...
1 parent 1fef4c3 commit 50a196b4c777dd898399893d387994d836df37e9 @jyurek jyurek committed Oct 6, 2010
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/paperclip/storage/filesystem.rb
@@ -56,6 +56,7 @@ def flush_deletes #:nodoc:
while(true)
path = File.dirname(path)
FileUtils.rmdir(path)
+ break if File.exists?(path) # Ruby 1.9.2 does not raise if the removal failed.
end
rescue Errno::EEXIST, Errno::ENOTEMPTY, Errno::ENOENT, Errno::EINVAL, Errno::ENOTDIR
# Stop trying to remove parent directories

0 comments on commit 50a196b

Please sign in to comment.