Explicitly chmod() for compatibility.

Apps typically have a umask() that prevents the mkdir() from setting
the requested permissions.

Bug: 27116987
Change-Id: Ia14e7e31531328ab36e902a864b3d2891feec544
This commit is contained in:
Jeff Sharkey
2016-02-15 14:16:08 -07:00
parent ae8f843a4a
commit 46ed6f4bd6

View File

@@ -492,6 +492,7 @@ class ContextImpl extends Context {
if (!file.exists()) {
try {
Os.mkdir(file.getAbsolutePath(), 0771);
Os.chmod(file.getAbsolutePath(), 0771);
} catch (ErrnoException e) {
if (e.errno == OsConstants.EEXIST) {
// We must have raced with someone; that's okay