4939819: File.canWrite() returns false for the "My Documents" directory (win)
Alan.Bateman at Sun.COM
Thu Apr 10 06:37:00 PDT 2008
I need a reviewer for 4939819. This is one that the desktop folks have
been asking to be fixed for some time. On Windows the DOS read-only
attribute doesn't make a directory read-only. Instead this attribute
just prevents a directory from being deleted. The bug is that
java.io.File's canWrite method returns false when this attribute is set
whereas it should be ignored when checking access to directories. The
attached patch fixes this by ignoring the attribute on directories.
There shouldn't be any side effects moving from _waccess to
GetFileAttributes because the Microsoft CRT has always implemented
_waccess as a call to GetFileAttributesW.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the core-libs-dev