[jcifs] leading space char in smb file name

Anonymous nobody at remailer.paranoici.org
Wed Apr 11 15:21:03 MDT 2012

I had a problem with the SmbFile.
I had a file with name "smb://server/share/folder/ foo.bar" on a smb server  ( foo.bar with leading blank). This file was created with jcifs, but calling 
new SmbFile("smb://server/share/folder/").listFiles[0].getName() only returns "foo.bar" with no leading blank. 

Before I had this problem, I didn't believe that it is possible to have files with leading blanks...

I've analyzed the problem, and figured out, that everything is transfered correct from the server to jcifs.
In the internal variable unc the path is stored with blank, but in canon, what is used for get name it's not.

I hope that helps improving jcifs



More information about the jCIFS mailing list