diff --git a/tool/make-snapshot b/tool/make-snapshot index eb26a87cc44fb5..154ee89b4c4441 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -518,8 +518,7 @@ touch-unicode-files: end vcs.after_export(".") if exported clean.concat(Dir.glob("ext/**/autom4te.cache")) - FileUtils.rm_rf(clean) unless $keep_temp - FileUtils.rm_rf(".downloaded-cache") + clean.add(".downloaded-cache") if File.exist?("gems/bundled_gems") gems = Dir.glob("gems/*.gem") gems -= File.readlines("gems/bundled_gems").map {|line| @@ -527,10 +526,11 @@ touch-unicode-files: name, version, _ = line.split(' ') "gems/#{name}-#{version}.gem" } - FileUtils.rm_f(gems) + clean.concat(gems) else - FileUtils.rm_rf("gems") + clean.add("gems") end + FileUtils.rm_rf(clean) if modified touch_all(modified, "**/*/", 0) do |name, stat| stat.mtime > modified