Bug 738032 - DevMgrADB shouldn't copy entire directory when checking if we can use run-as. r=gbrown

This commit is contained in:
William Lachance 2012-03-23 21:50:35 -04:00
parent 7d0201fae0
commit 28f8105bd7

View File

@ -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: