From 3bf88f7a4b9bb9f27fddb7bce0a610245a1dc59d Mon Sep 17 00:00:00 2001 From: Steven Foerster Date: Sat, 8 Jun 2019 01:14:15 -0400 Subject: [PATCH] bugfix: unpack for nonzip archives also needs to compare basename(dir) --- pythonforandroid/recipe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonforandroid/recipe.py b/pythonforandroid/recipe.py index f899aa927b..9b07a3cf1b 100644 --- a/pythonforandroid/recipe.py +++ b/pythonforandroid/recipe.py @@ -409,7 +409,7 @@ def unpack(self, arch): sh.tar('xf', extraction_filename) root_directory = sh.tar('tf', extraction_filename).stdout.decode( 'utf-8').split('\n')[0].split('/')[0] - if root_directory != directory_name: + if root_directory != basename(directory_name): shprint(sh.mv, root_directory, directory_name) else: raise Exception(