jekyll/jekyll — pull request #2535 by simonsarris (2014-06-19 22:26:36+00:00)
Title: Before copying file, explicitly remove the old one

On Windows, FileUtils.cp(path, dest_path) will fail with a Permission
Denied if the dest_path already exists and is read-only. People have
complained about this since at least 2008.

This lets `jekyll build` work without error in Windows when one or more
read-only files exist.

This change will accommodate users of Team Foundation, which uses the
read-only flag for for source control status. (dumb, I know, but but a
real problem)

See https://github.com/jekyll/jekyll/issues/2534 for details and discussion.