Permalink
Browse files

skip rm for directories when unzip force=true

  • Loading branch information...
1 parent 0e6866f commit 5e3086e4b924836c61f928613e441415c6a9ae05 @dougm dougm committed Aug 18, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 windows/providers/unzip.rb
@@ -27,7 +27,7 @@ def action_run
zip.each do |entry|
path = ::File.join(@new_resource.path, entry.name)
FileUtils.mkdir_p(::File.dirname(path))
- if @new_resource.force && ::File.exists?(path)
+ if @new_resource.force && ::File.exists?(path) && !::File.directory?(path)
FileUtils.rm(path)
end
zip.extract(entry, path)

0 comments on commit 5e3086e

Please sign in to comment.