7034532: (fs) AssertionError when working directory is UNC
authoralanb
Sun, 10 Apr 2011 19:45:28 +0100
changeset 9251 4352359acb79
parent 9246 c459f79af46b
child 9252 9484925c9c2b
7034532: (fs) AssertionError when working directory is UNC Reviewed-by: forax, mduigou
jdk/src/windows/classes/sun/nio/fs/WindowsFileSystem.java
--- a/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystem.java	Fri Apr 08 02:00:09 2011 -0700
+++ b/jdk/src/windows/classes/sun/nio/fs/WindowsFileSystem.java	Sun Apr 10 19:45:28 2011 +0100
@@ -56,8 +56,9 @@
         // parse default directory and check it is absolute
         WindowsPathParser.Result result = WindowsPathParser.parse(dir);
 
-        if (result.type() != WindowsPathType.ABSOLUTE)
-            throw new AssertionError("Default directory must be absolute/non-UNC");
+        if ((result.type() != WindowsPathType.ABSOLUTE) &&
+            (result.type() != WindowsPathType.UNC))
+            throw new AssertionError("Default directory is not an absolute path");
         this.defaultDirectory = result.path();
         this.defaultRoot = result.root();