commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From J-Pro <jpro....@gmail.com>
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 
"exist()".
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 =
    
",AMCPROD,derivative_pricing_ssb_cds_20100910_00.xml.pgp,U,20100910A00012022189.txt";
    // .... dir initialization
    FileObject neededFile = dir.resolveFile(fileName);
    return neededFile.exists();

Thank you very much in advance.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message