[bug] SmbFile.exists always return true
YLombardi <[email protected]> Thu, 30 Apr 2015 02:41:24 -0700 (PDT)
| Newsgroups | gmane.network.samba.java |
|---|---|
| Message-ID | <[email protected]> |
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.