lib/nanoc/base/services/pruner.rb in nanoc-4.7.9 vs lib/nanoc/base/services/pruner.rb in nanoc-4.7.10

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require 'find' module Nanoc # Responsible for finding and deleting files in the site’s output directory # that are not managed by Nanoc. @@ -70,14 +72,14 @@ Find.find(dir) do |f| basename = File.basename(f) case File.ftype(f) - when 'file'.freeze + when 'file' unless exclude?(basename) present_files << f end - when 'directory'.freeze + when 'directory' if exclude?(basename) Find.prune else present_dirs << f end