1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-07-07 09:50:07 +02:00

install_ndk: cleanup tempdir

This commit is contained in:
Jochen Sprickerhof 2022-11-25 12:41:52 +01:00
parent b285603e43
commit 4a6ccae71a
No known key found for this signature in database
GPG Key ID: 5BFFDCC258E69433

View File

@ -4253,8 +4253,9 @@ def _install_ndk(ndk):
raise FDroidException("NDK %s not found" % ndk)
ndk_base = os.path.join(config['sdk_path'], 'ndk')
logging.info(_('Downloading %s') % url)
with tempfile.TemporaryDirectory(prefix='android-ndk-') as ndk_dir:
zipball = os.path.join(
tempfile.mkdtemp(prefix='android-ndk-'),
ndk_dir,
os.path.basename(url)
)
net.download_file(url, zipball)