Merge branch 'fix_783' into 'master'

strip_and_copy_image: abort on broken symlinks

Closes #783

See merge request fdroid/fdroidserver!760
This commit is contained in:
Marcus 2020-06-04 11:20:43 +00:00
commit 3bf2d60bfa
1 changed files with 7 additions and 0 deletions

View File

@ -797,6 +797,13 @@ def _strip_and_copy_image(in_file, outpath):
"""
logging.debug('copying ' + in_file + ' ' + outpath)
if not os.path.exists(in_file):
if os.path.islink(in_file):
logging.warning(_("Broken symlink: {path}").format(path=in_file))
else:
logging.warning(_("File disappeared while processing it: {path}").format(path=in_file))
return
if os.path.isdir(outpath):
out_file = os.path.join(outpath, os.path.basename(in_file))
else: