OSDN Git Service

We also need to tell it the file mode when creating the output.
authorDan Bornstein <danfuzz@android.com>
Mon, 13 Sep 2010 01:27:00 +0000 (18:27 -0700)
committerDan Bornstein <danfuzz@android.com>
Mon, 13 Sep 2010 01:27:00 +0000 (18:27 -0700)
Thanks to Elliott for catching this.

Change-Id: Ibb89ece3dd2e1d39a8a2d51cb8b7278842e057a1

dexopt/OptMain.c

index cde3d18..ca55565 100644 (file)
@@ -346,7 +346,7 @@ static int preopt(int argc, char* const argv[])
         goto bail;
     }
 
-    outFd = open(outName, O_RDWR | O_EXCL | O_CREAT);
+    outFd = open(outName, O_RDWR | O_EXCL | O_CREAT, 0666);
     if (outFd < 0) {
         perror(argv[0]);
         goto bail;