rmdir_if_possible should ignore EACCES

It was raising an exception, which stopped prune in its tracks when
something was installed root, eg. Fuse.
This commit is contained in:
Max Howell 2009-08-11 00:27:43 +01:00
parent 3b262d0b23
commit bd86ab508a

View File

@ -74,7 +74,7 @@ class Pathname
def rmdir_if_possible
rmdir
rescue SystemCallError => e
raise unless e.errno == Errno::ENOTEMPTY::Errno
raise unless e.errno == Errno::ENOTEMPTY::Errno or e.errno == Errno::EACCES::Errno
end
def chmod_R perms