commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "VS (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NET-409) FTPClient truncates file (storeFile method)
Date Tue, 17 Sep 2013 06:32:51 GMT

    [ https://issues.apache.org/jira/browse/NET-409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13769254#comment-13769254
] 

VS commented on NET-409:
------------------------

This problem is still valid in version 3.3.
I copy a file of dimension 1.921.303 and at the destination the dimension is 1.921.283.
This is the code.
                client = new FTPClient();
                client.connect(server);
                int reply = client.getReplyCode();

                if(!FTPReply.isPositiveCompletion(reply)) {
                    client.disconnect();
                    System.err.println("FTP server refused connection.");
                    return;
                } else {
                    if(client.login(userName, password)) {
                        System.out.println("FTP connected");
                        System.out.println("FTP logged in");
                        fis = new FileInputStream(srcFileName);
                        if(!client.storeFile(dstFileName, fis)) {
                            String raspuns_text = client.getReplyString();
                            client.logout();
                            return;
                        }
                        System.out.println("FTP file stored");
                        client.logout();
                        System.out.println("FTP logged out");
                    } else {
                        return;
                    }
                }

                
> FTPClient truncates file (storeFile method)
> -------------------------------------------
>
>                 Key: NET-409
>                 URL: https://issues.apache.org/jira/browse/NET-409
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.0
>         Environment: Windows 7/Eclipse 3.6.2
>            Reporter: Jon Ericson
>             Fix For: 3.0.1
>
>
> Functionality works fine on commons-net-2.2.  Error occurred after upgrading library
to commons-net-3.0 version.  Sending a file from Windows 7 to CentOS/Linux using FTPClient
storeFile method results in truncation of files over 2k in size.  Rolling back upgrade to
commons-net-2.2 version fixes problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message