Skip to content

Commit

Permalink
Also ignore Emacs autosave files
Browse files Browse the repository at this point in the history
  • Loading branch information
bmaland committed Feb 22, 2009
1 parent 0ec9a13 commit 25d4951
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/jekyll/site.rb
Expand Up @@ -93,7 +93,7 @@ def write_posts

# Copy all regular files from <source> to <dest>/ ignoring
# any files/directories that are hidden or backup files (start
# with "." or end with "~") or contain site content (start with "_")
# with "." or "#" or end with "~") or contain site content (start with "_")
# unless they are "_posts" directories or web server files such as
# '.htaccess'
# The +dir+ String is a relative path used to call this method
Expand All @@ -105,7 +105,7 @@ def transform_pages(dir = '')
entries = Dir.entries(base)
entries = entries.reject { |e| e[-1..-1] == '~' }
entries = entries.reject do |e|
(e != '_posts') and ['.', '_'].include?(e[0..0]) unless ['.htaccess'].include?(e)
(e != '_posts') and ['.', '_', '#'].include?(e[0..0]) unless ['.htaccess'].include?(e)
end
directories = entries.select { |e| File.directory?(File.join(base, e)) }
files = entries.reject { |e| File.directory?(File.join(base, e)) }
Expand Down

0 comments on commit 25d4951

Please sign in to comment.