提交 32f996d9 编写于 作者: S sherman

7023244: (zipfs) langtools CompileTest fails on read-only file system

Summary: replaced checkAccess with Files.isWritable()
Reviewed-by: alanb
上级 d13d9682
......@@ -112,11 +112,8 @@ public class ZipFileSystem extends FileSystem {
}
// sm and existence check
zfpath.getFileSystem().provider().checkAccess(zfpath, AccessMode.READ);
try {
zfpath.getFileSystem().provider().checkAccess(zfpath, AccessMode.WRITE);
} catch (AccessDeniedException x) {
if (!Files.isWritable(zfpath))
this.readOnly = true;
}
this.zc = ZipCoder.get(nameEncoding);
this.defaultdir = new ZipPath(this, getBytes(defaultDir));
this.ch = Files.newByteChannel(zfpath, READ);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册