Name: dbT83986 Date: 05/25/99
Given a UNC path such as \\thor\apps\java
the sequence of parents returned is
\\thor\apps
\\thor
\
However, the last two in this sequence are not
directories, which contradicts the documentation
for this method. The ".." notation works to obtain
a parent directory, but does not work to change to a different share.
i.e.
\\thor\apps\..\code is not a synonym for \\thor\code
Thus for UNC paths the 'prefix' should be \\machine\share and not just the \\ part. Of course it would be easier to change the documentation ...
I was attempting to create a portable method to determine the relative path between two absolute paths (if one exists), but the existing File
class does not provide sufficient information about the file system to make this possible.
(Review ID: 83441)
======================================================================
- relates to
-
JDK-5086147 File,URI,URL conversions are strange for UNC path
-
- Resolved
-