From af3bfab9db74951783aa3d90ee36d5aa9547b15a Mon Sep 17 00:00:00 2001 From: Simon Sigurdhsson Date: Sat, 4 Aug 2012 18:50:17 +0200 Subject: Make `CurlDownloadStrategy` resume aborted downloads * `CurlDownloadStrategy#_fetch` (and the same methods in its subclasses) now fetches the file to a temporary path, and `CurlDownloadStrategy#fetch` moves it to the correct location. * `Homebrew#cleanup` cleans the temporary files `CurlDownloadStrategy` creates if they're left in the cache. Closes Homebrew/homebrew#13953. Signed-off-by: Mike McQuaid --- Library/Homebrew/cmd/cleanup.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb index 6b4e6b400..490065606 100644 --- a/Library/Homebrew/cmd/cleanup.rb +++ b/Library/Homebrew/cmd/cleanup.rb @@ -77,6 +77,10 @@ module Homebrew extend self end end end + if pn.basename.to_s.split('.').last == 'incomplete' + puts "Removing #{pn}..." + rm pn unless ARGV.dry_run? + end end end -- cgit v1.2.3