From 2983c353615b8d0aa0d70ef616ec1507c617f646 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 1 Dec 2017 14:08:42 +0100 Subject: [PATCH] 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' --- fdroidserver/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 24c695e2..e15651d3 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -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(): -- 2.30.2