]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/chef/libraries/remote_directory.rb
Rebuild assets when the configuration changes
[chef.git] / cookbooks / chef / libraries / remote_directory.rb
index 65cb9c86d9b2f2e09721b8308f15686356cb6975..959eb29409445514cf376d133d26cdadfbb7e83c 100644 (file)
@@ -15,11 +15,11 @@ class Chef
         return unless @new_resource.purge
 
         files_to_purge = Set.new(
         return unless @new_resource.purge
 
         files_to_purge = Set.new(
-          Dir.glob(::File.join(@new_resource.path, '**', '*'), ::File::FNM_DOTMATCH).select do |name|
+          Dir.glob(::File.join(@new_resource.path, "**", "*"), ::File::FNM_DOTMATCH).select do |name|
             name !~ /(?:^|#{Regexp.escape(::File::SEPARATOR)})\.\.?$/
           end
         )
             name !~ /(?:^|#{Regexp.escape(::File::SEPARATOR)})\.\.?$/
           end
         )
-        files_to_purge = files_to_purge - files_transferred
+        files_to_purge -= files_transferred
         purge_unmanaged_files(files_to_purge)
       end
     end
         purge_unmanaged_files(files_to_purge)
       end
     end