Merge pull request #7705 from ashmaroli/filter-dot-entries

Reject entries that are just dots in a directory
This commit is contained in:
Frank Taillandier 2019-06-14 08:31:57 +02:00 committed by GitHub
commit cca639dcc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -31,6 +31,9 @@ module Jekyll
def filter(entries)
entries.reject do |e|
# Reject this entry if it is just a "dot" representation.
# e.g.: '.', '..', '_movies/.', 'music/..', etc
next true if e.end_with?(".")
# Reject this entry if it is a symlink.
next true if symlink?(e)
# Do not reject this entry if it is included.