Mercurial > hg > graal-compiler
changeset 6688:806821a1c0a8
Make sure files in copy of JDK has write-protection unset before modifying it.
author | Laurent Daynes <Laurent.Daynes@oracle.com> |
---|---|
date | Wed, 24 Oct 2012 12:59:22 +0200 |
parents | a9a50f21e000 |
children | 7e77e6359cde |
files | mx/commands.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mx/commands.py Tue Oct 23 17:08:17 2012 +0200 +++ b/mx/commands.py Wed Oct 24 12:59:22 2012 +0200 @@ -350,6 +350,7 @@ assert defaultVM is not None, 'Could not find default VM in ' + jvmCfg if mx.get_os() != 'windows': os.chmod(_vmLibDirInJdk(jdk), 0755) + os.chmod(jvmCfg, 0755) shutil.copytree(join(_vmLibDirInJdk(jdk), defaultVM), join(_vmLibDirInJdk(jdk), defaultVM + '0')) with open(jvmCfg, 'w') as f: @@ -569,6 +570,8 @@ if not found: mx.log('Appending "' + prefix + ' KNOWN" to ' + jvmCfg) lines.append(vmKnown) + if mx.get_os() != 'windows': + os.chmod(jvmCfg, 0755) with open(jvmCfg, 'w') as f: for line in lines: f.write(line)