chevah/compat — pull request #41 by adiroiban (2014-11-03 18:01:17+00:00)
Title: [2486] Fix deleting of folders with read only files on Windows.

Problem
=======

On Windows, if a folder contains a read only file, recursive delete fails.

Reading the Windows documentation I see that read-only should not protect it from deletion

​http://windows.microsoft.com/en-us/windows7/prevent-changes-to-a-file-by-setting-it-to-read-only
Warning
```
Read-only files can't be modified, but they can be copied, moved, renamed, or deleted. It's possible that moving, renaming, or deleting a read-only file can cause a program that relies on the file to stop working properly.
```

Why we got this
============

We did not have a test for that.
We used the standard python method... and I don't know why it behaves this way.

Changes
=======

I have changed to code so that on Windows it will remove the read-only flag and try to delete it again.

I don't consider the read-only attribute a file system permission, but just a hint.

I have kept the old behaviour for Unix so that filesystem permissions are not violated.

How to test
========

reviewers: @alibotean

check that changes make sense...

I will also fix this in brink so that we no longer have this errors with paver deps

thanks!