@@ -548,12 +548,12 @@ function main!(content::OutputJsonContent, cfg::Config)
548548 # Download this URL to a local file in a temp directory
549549 number_urls_tried += 1
550550
551- # This will download the file to a tempfile, which will automatically
552- # be cleaned up when the Julia process exits.
551+ # This will download the file to a tempfile
553552 filepath = Downloads. download (string (url))
554553
555554 if filesize (filepath) == 0
556555 # The file is empty
556+ rm (filepath; force = true )
557557 update_download_progress! (version, filename; advance = true )
558558 continue # skip the rest of this for-loop iteration
559559 end
@@ -622,6 +622,9 @@ function main!(content::OutputJsonContent, cfg::Config)
622622 # Let's be forward-thinking: Make this an array of dictionaries that is
623623 # easy to extensibly match.
624624 push! (meta[version]. files, FileDict (file_dict))
625+
626+ # Delete the downloaded file
627+ rm (filepath; force = true )
625628 end
626629
627630 file_dict = find_filedict (content, version, url)
@@ -640,11 +643,12 @@ function main!(content::OutputJsonContent, cfg::Config)
640643 asc_filename = basename (string (asc_url))
641644 @debug " Downloading $asc_filename "
642645 try
643- asc_filepath = download_to_cache (asc_filename, asc_url)
646+ asc_filepath = Downloads . download ( string ( asc_url) )
644647 asc_signature = String (read (asc_filepath))
648+ rm (asc_filepath)
645649 catch ex
646- if (ex isa HTTP . Exceptions . StatusError ) && (ex. status == 404 )
647- # mark_url_as_nonexistent!(content, version, url) # TODO : Decide if we want to mark
650+ if (ex isa Downloads . RequestError ) && (ex. response . status == 404 )
651+ mark_url_as_nonexistent! (content, version, url)
648652 update_download_progress! (version, filename; advance = true )
649653 continue # skip the rest of this for-loop iteration
650654 else
0 commit comments