mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 07:22:29 +03:00
common: check file existence before opening manifest
This fixes a problem when there is a broken symlink with the name AndroidManifest.xml which will then lead to a crash when trying to open it for trying to remove the debuggable flag.
This commit is contained in:
parent
95c5b0840c
commit
e307cdec59
1 changed files with 1 additions and 1 deletions
|
@ -1210,7 +1210,7 @@ def remove_debuggable_flags(root_dir):
|
|||
# Remove forced debuggable flags
|
||||
logging.debug("Removing debuggable flags from %s" % root_dir)
|
||||
for root, dirs, files in os.walk(root_dir):
|
||||
if 'AndroidManifest.xml' in files:
|
||||
if 'AndroidManifest.xml' in files and os.path.isfile(os.path.join(root, 'AndroidManifest.xml')):
|
||||
regsub_file(r'android:debuggable="[^"]*"',
|
||||
'',
|
||||
os.path.join(root, 'AndroidManifest.xml'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue