mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-02 09:10:11 +02:00
shutil.move() in apk_strip_signature() to work across filesystems
os.rename() only works if source and destination are on the same file system, shutil.move() works across file systems. OSError: [Errno 18] Invalid cross-device link: '/builds/eighthave/fdroidclient/app/build/outputs/apk/app-debug.apk' -> '/tmp/tmp966vh75f/tmp.apk'
This commit is contained in:
parent
bf913703c5
commit
2983c35361
@ -2368,7 +2368,7 @@ def apk_strip_signatures(signed_apk, strip_manifest=False):
|
||||
"""
|
||||
with tempfile.TemporaryDirectory() as tmpdir:
|
||||
tmp_apk = os.path.join(tmpdir, 'tmp.apk')
|
||||
os.rename(signed_apk, tmp_apk)
|
||||
shutil.move(signed_apk, tmp_apk)
|
||||
with ZipFile(tmp_apk, 'r') as in_apk:
|
||||
with ZipFile(signed_apk, 'w') as out_apk:
|
||||
for info in in_apk.infolist():
|
||||
|
Loading…
Reference in New Issue
Block a user