caskroom/homebrew-cask — pull request #5596 by rolandwalker (2014-07-31 14:04:50+00:00)
Title: force permissions and delete ACLs before `rmtree`

This logic is ugly as the installation directory will be left
in a mangled state if it fails partway through. However, the
same is true when `rmtree` fails partway through, which this
code is intended to minimize.

References: #5504