From 28f8105bd7c3d93cb85eaa9db8c3c03dadb9fb5e Mon Sep 17 00:00:00 2001 From: William Lachance Date: Fri, 23 Mar 2012 21:50:35 -0400 Subject: [PATCH] Bug 738032 - DevMgrADB shouldn't copy entire directory when checking if we can use run-as. r=gbrown --- build/mobile/devicemanagerADB.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/mobile/devicemanagerADB.py b/build/mobile/devicemanagerADB.py index 2d4fb0a14c3..d47c367b537 100644 --- a/build/mobile/devicemanagerADB.py +++ b/build/mobile/devicemanagerADB.py @@ -774,7 +774,8 @@ class DeviceManagerADB(DeviceManager): "is unknown" in runAsOut): raise DMError("run-as failed sanity check") - self.checkCmd(["push", os.path.abspath(sys.argv[0]), tmpDir + "/tmpfile"]) + tmpfile = tempfile.NamedTemporaryFile() + self.checkCmd(["push", tmpfile.name, tmpDir + "/tmpfile"]) if self.useDDCopy: self.checkCmd(["shell", "run-as", self.packageName, "dd", "if=" + tmpDir + "/tmpfile", "of=" + devroot + "/sanity/tmpfile"]) else: