Skip to content
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

Use FileUtils#remove_entry_secure in StaticFile#write #9355

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 24, 2023

  1. Use FileUtils#remove_entry_secure in StaticFile#write

    Sometimes the `dest_path` in Jekyll::StaticFile#write is a directory. When this happens, `FileUtils.rm(dest_path)` will raise an exception.
    
    Using `FileUtils.remove_entry_secure(dest_path)` instead will not raise an exception and remove (aka “unlink”) file system entries if the file `dest_path` points to is a directory or a non-directory file.
    edward committed Apr 24, 2023
    Configuration menu
    Copy the full SHA
    ee5b71f View commit details
    Browse the repository at this point in the history