Properly clean up downloaded zips (#322)
We got this wrong because we were not using get_download_target, so we were trying to delete the wrong file. Also add a test. Fixes #320
This commit is contained in:
6
emsdk
6
emsdk
@@ -1624,9 +1624,9 @@ class Tool(object):
|
||||
url = self.download_url()
|
||||
if url.endswith(ARCHIVE_SUFFIXES):
|
||||
file_name = url.split('/')[-1]
|
||||
tempzipfile = os.path.join('zips/', file_name)
|
||||
if VERBOSE: print("Deleting temporary zip file " + tempzipfile)
|
||||
rmfile(tempzipfile)
|
||||
download_target = get_download_target(url, zips_subdir, getattr(self, 'zipfile_prefix', ''))
|
||||
if VERBOSE: print("Deleting temporary zip file " + download_target)
|
||||
rmfile(download_target)
|
||||
|
||||
def uninstall(self):
|
||||
if not self.is_installed():
|
||||
|
||||
Reference in New Issue
Block a user