mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 07:22:29 +03:00
build: fix directories removal
The 'dirs' array contains a single-level listing of a directory, e. g. ['app', 'build', 'build.gradle', 'gradle', '.gradle']. Multi-component paths like 'build/tmp' could never be found in this array and thus were never removed. Call shutil.rmtree() without checking that the argument is in 'dirs'. If it exists and is a directory, it'll be removed. Otherwise shutil.rmtree() will do nothing.
This commit is contained in:
parent
68c072c72e
commit
ddfbd1cc47
1 changed files with 1 additions and 2 deletions
|
@ -475,8 +475,7 @@ def build_local(app, build, vcs, build_dir, output_dir, log_dir, srclib_dir, ext
|
||||||
|
|
||||||
def del_dirs(dl):
|
def del_dirs(dl):
|
||||||
for d in dl:
|
for d in dl:
|
||||||
if d in dirs:
|
shutil.rmtree(os.path.join(root, d), ignore_errors=True)
|
||||||
shutil.rmtree(os.path.join(root, d))
|
|
||||||
|
|
||||||
def del_files(fl):
|
def del_files(fl):
|
||||||
for f in fl:
|
for f in fl:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue