[jcifs] [bug] SmbFile.exists always return true
YLombardi
ylombardi at geodisbm.com
Thu Apr 30 03:57:08 MDT 2015
I'm using jcifs-1.3.17 and SmbFile and I have a strange error. I create an
SmbFile from an address that doesn't exists but when I call the exists()
method on this SmbFile, it always return true.
Here is my code :
String address = "AFalseAddress";
jcifs.Config.registerSmbURLHandler();
NtlmPasswordAuthentication auth = null;
try {
auth = new
NtlmPasswordAuthentication("ADomainThatExists","AWrongLogin","AWrongPassword");
} catch (Exception e) {
}
try {
SmbFile smbFile = new SmbFile("smb:"+address,auth);
if (smbFile.exists()) // Why is this true ???
smbFile.delete();
} catch (MalformedURLException e) {
} catch (SmbException e) {
}
I don't understand why smbfile.exists always return true even if the file
doesn't exist on the server.
Why have I this result ?
--
View this message in context: http://samba.2283325.n4.nabble.com/bug-SmbFile-exists-always-return-true-tp4685318.html
Sent from the Samba - jcifs mailing list archive at Nabble.com.
More information about the jCIFS
mailing list