<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Arial; font-size: 10pt; color: #000000'>Hello Mike,<br><br>We found a bug in JCIF that breaks support for file names that start with ".#" and "..#", and we developed a patch (see attached).<br><br>The bug is a direct result of the differences between how java.net.URL and java.net.URLStreamHandler parse URLs (or put another way, a direct result of the differences between smb URLs and http URLs).&nbsp; Everything works fine if the URL is constructed without a context (parent). However, when construcing a URL with a parent, the "." and ".." (of .# and ..#) are treated as relative path specifiers.&nbsp; This is becuase everything after the hash is treated as a ref (anchor), and when the ref is removed, all that is left is the "." and "..".<br><br>Examples:<br><br>jcifs.Config.registerSmbURLHandler();<br><br>// Works fine<br>URL url = new URL("smb://some-share/dir/..#twodots");<br>// prints out "url: smb://some-share/dir/..#twodots"<br>System.out.println("url: " + url.toString());&nbsp; <br><br>// Does NOT work<br>URL parent = new URL("smb://some-share/dir/");<br>url = new URL(parent, "..#twodots");<br><br>// prints out "url: smb://some-share/#twodots"&nbsp; &lt;-- WRONG, notice that "/dir" is missing from the path, and how the ".." is missing<br>System.out.println("url: " + url.toString());<br><br>The problem affects not just URLs, but also SmbFile instances (since all of the constructors ultimately create a URL). The patch adds some handing for these special casses to the jcifs.smb.Handler class.<br><br>In addition to the patch (which was developed against JCIFS 1.3.14), I've included a JUnit 4 Parameterized test that exercises many more examples of the problem.&nbsp; We used the JUnit test class to validate that our patch works.&nbsp; It's easy to add additional tests, so if there is any inputs that you think we should test (to make sure that our patch doesn't break any existing functionality), let us know and we'll add them.<br><br>Regards,<br><br>Jim Hurne | Software Engineer<br>Office: +1.412.422.2499 | Mobile: +1.724.683.1500<br>1710 Murray Avenue, Pittsburgh PA 15217 USA<br>hurne@vivisimo.com | Connect: www.vivisimo.com<br>Vivisimo - Information Optimized<br></div></body></html>