Skip to content

Commit 4cf9e90

Browse files
thopiekarinclement
authored andcommitted
toolchain: Copying sourcetree less ugly
1 parent cd6a5a2 commit 4cf9e90

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pythonforandroid/toolchain.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1682,7 +1682,10 @@ def unpack(self, arch):
16821682
raise Exception('Could not extract {} download, it must be .zip, '
16831683
'.tar.gz or .tar.bz2')
16841684
elif os.path.isdir(extraction_filename):
1685-
shutil.copytree(extraction_filename, directory_name)
1685+
os.mkdir(directory_name)
1686+
for entry in os.listdir(extraction_filename):
1687+
if entry not in ('.git',):
1688+
shprint(sh.cp, '-Rv', os.path.join(extraction_filename, entry), directory_name)
16861689
else:
16871690
raise Exception('Given path is neither a file nor a directory: {}'.format(extraction_filename))
16881691

0 commit comments

Comments
 (0)