6867101: Path.checkAccess fails with sharing violation on special files such as pagefile.sys
Xueming Shen
Xueming.Shen at Sun.COM
Thu Jul 30 14:32:16 PDT 2009
Looks fine. Did not know the FindFirstFile can do the trick. _wstati64
was used to workaround the
getLength for pagefile.sys and hiberfil.sys in WinNTFileSystem_md.c.
Sherman
Alan Bateman wrote:
> Sherman - do you mind reviewing this one?
>
> Applications on Windows periodically encounter system files such as
> those to support paging or hibernation that aren't intended to be
> accessed by regular applications. Attempts to access such files
> typically fails with a sharing violation, confusing convenience
> methods such as "exists" as they can't confirm the existence of the
> file. This patch adds a fallback to read the attributes via a
> directory search.
> http://cr.openjdk.java.net/~alanb/6867101/webrev.00/
>
> Thanks,
> Alan.
More information about the nio-dev
mailing list