[jcifs] fixes for SmbFile.java

Allen, Michael B (RSCH) Michael_B_Allen at ml.com
Thu Sep 12 10:20:16 EST 2002


Christian,

I have heard of this bug and have not been able to reproduce it. Can you identify
the condition under which this occurs? Is there a particular uncanonicalized URL
or perhaps I need to create an SmbFile from another SmbFile using two URLs
that meet some strange criteria? I would greatly appreciated you help in this
matter.

> -----Original Message-----
> From:	Christian Fraenkel [SMTP:c.fraenkel at gmx.net]
> Sent:	Wednesday, September 11, 2002 8:18 PM
> To:	jcifs at lists.samba.org
> Subject:	[jcifs] fixes for SmbFile.java
> 
> 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




More information about the jcifs mailing list