On some source control systems (perforce), checked out files are by default readonly (unlike git, subversion, etc.)

Using win-tool to do a recursive copy is failing on such systems, because for example, if I had a 'copies' clause in my gyp that put stuff from my source tree into my output directory, it would copy them fine the first time, but it would leave them with the initial file modes: read only.

This means that subsequent attempts at copying the files would result in permission errors. Python's os.unlink() (and shtuil.rmtree) are pretty passive when it comes to read-only files, they raise an exception right away.

Note that under CMD, the command "COPY from to" would prompt to force copy these files to be copied. "COPY /Y from to" would force the copy. Under cygwin, "cp -af from to" would of course work as expected.

The comment in ExecRecursiveMirror says that it should emulate "rm -rf out and cp -af in out", which, as it stands currently, is not exactly true. This change helps to make this routine closer to what it's supposed to be.

BUG=
R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/192213002

git-svn-id: http://gyp.googlecode.com/svn/trunk@1875 78cadc50-ecff-11dd-a971-7dbc132099af