New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Before copying file, explicitly remove the old one #2535

Merged
merged 1 commit into from Jun 23, 2014

Conversation

Projects
None yet
3 participants
@simonsarris
Contributor

simonsarris commented Jun 19, 2014

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 (in Ruby on Windows, not in Jekyll) since at least 2008.

This patch 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, and other source control systems work with file locks too)

See #2534 for details and discussion that lead to this discovery.

Simon Sarris
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)
@parkr

This comment has been minimized.

Member

parkr commented Jun 20, 2014

This looks fine to me. Thanks!

parkr added a commit that referenced this pull request Jun 23, 2014

@parkr parkr merged commit 4c04420 into jekyll:master Jun 23, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

parkr added a commit that referenced this pull request Jun 23, 2014

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.