commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From J-Pro <>
Subject [VFS] The same "FileObject.exist()" call returns different values in Windows 7 and Linux Ubuntu while connected to simple FTP
Date Thu, 30 Sep 2010 19:54:50 GMT
  Good afternoon.

Today I've found an interesting thing in VFS. I've spent 4 hours testing 
it in different situations. It looks like a bug, but I want to ask all 
of you first.

My code uses VFS to connect to FTP (simple FTP, but on port 22221) and 
copy a file from there(ftp://HOSTNAME:22221/alex/test.txt.asc.pgp). But 
before copying I'm checking if the file exists using FileObject's method 
The thing is that when I run my JAR from command line of Windows 7, 
"exist()" returns true. But if only I run the same JAR from Linux Mint 9 
Isadora(2.6.32-21-generic), this method returns false.
I've made a test and found out that if I change port from 22221 to 
simple 21, JAR runs fine on both systems, i.e. "exist()" returns true. 
This strange thing in Linux happens only when I use port number 22221.

Please tell me is it my error somewhere or is it really some kind of a bug?

My code for checking if the file exists is:

    FileObject dir = null;
    String fileName =
    // .... dir initialization
    FileObject neededFile = dir.resolveFile(fileName);
    return neededFile.exists();

Thank you very much in advance.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message