JDK 10 RFR of 8182710: File.listRoots() always returns the root of CD drive

Brian Burkhalter brian.burkhalter at oracle.com
Fri Jun 23 21:56:26 UTC 2017

Please review at your convenience.


The listRoots() method invokes the GetLogicalDrives() Windows function [1] which may set the bit for a CD’s logical drive even if no CD is currently inserted which also means that the root at which the CD file system would exist were a CD inserted is included in the returned list even though that file system location does not actually exist. This change eliminates including any locations implied by a set bit in the return value of GetLogicalDrives() if that location does not exist.



[1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa364972(v=vs.85).aspx

More information about the core-libs-dev mailing list