ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 23143] New: - FTP put (with chmod set) from Windows-to-UNIX: wrong separator
Date Fri, 12 Sep 2003 17:34:49 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23143>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23143

FTP put (with chmod set) from Windows-to-UNIX: wrong separator

           Summary: FTP put (with chmod set) from Windows-to-UNIX: wrong
                    separator
           Product: Ant
           Version: 1.6Alpha (nightly)
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: cmcfarland@onebox.com


Bug #11044 (FTP chmod action: wrong separator) was fixed in Ant v1.6alpha so 
that the "chmod" action from optional FTP task works correctly when 
transferring files from windows to UNIX.

Unfortunately, a similar bug still exists (in v1.6alpha) in FTP task (FTP.java) 
inside the sendFile method when trying to execute the "put" action with the FTP 
chmod property set. Let me explain (all line #'s listed below are inside 
sendFile method).

Line #1678 creates a file to transfer and then calls resolveFile(filename) to 
fix the separator for the target platform. This is good. What is bad is the 
code on line #1709 to issue a chmod Site Command. The chmod Site Command is 
issued with the the old "filename" variable, which contains the Windows 
separators. Because of this, the chmod is not successful when the source 
platform is Windows and the target platform is UNIX. To fix this, line 1709 
should have been something like:

  doSiteCommand(ftp, "chmod " + chmod + " " + file.getPath());

The file.getPath() will designate the correct separator and the chmod should 
execute successfully.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message