[jcifs] fixes for SmbFile.java

Christian Fraenkel c.fraenkel at gmx.net
Thu Sep 12 10:18:03 EST 2002


Hi, I am currently playing around with jcifs classes and I found the following bug: after a SmbFile.toUrl() the String doesn't contain a '/' between the share and the filename. the following diff should solve that.

Christian

--- jcifs_0.7.0b3/src/jcifs/smb/SmbFile.java    Sun Aug 25 11:39:48 2002
+++ jcifs_0.7.0b3-fixed/src/jcifs/smb/SmbFile.java      Thu Sep 12 02:02:08 2002
@@ -675,6 +675,8 @@
                        if( share != null ) {
                                sb.append( '/' ).append( share );
                                if( canonicalPath != null ) {
+                                       if (canonicalPath.charAt(0) != '/')
+                                               sb.append("/");
                                        sb.append( canonicalPath );
                                }
                        }

-- 
public key: http://www.uni-ulm.de/~s_cfraen/gpg.publickey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/jcifs/attachments/20020912/b806fe75/attachment.bin


More information about the jcifs mailing list