From dev-return-50523-apmail-ant-dev-archive=ant.apache.org@ant.apache.org Fri Sep 12 17:32:07 2003 Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 7321 invoked from network); 12 Sep 2003 17:32:07 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 12 Sep 2003 17:32:07 -0000 Received: (qmail 46311 invoked by uid 500); 12 Sep 2003 17:31:55 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 46269 invoked by uid 500); 12 Sep 2003 17:31:55 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 46256 invoked from network); 12 Sep 2003 17:31:55 -0000 Received: from unknown (HELO exchange.sun.com) (192.18.33.10) by daedalus.apache.org with SMTP; 12 Sep 2003 17:31:55 -0000 Received: (qmail 24855 invoked by uid 50); 12 Sep 2003 17:34:49 -0000 Date: 12 Sep 2003 17:34:49 -0000 Message-ID: <20030912173449.24854.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: dev@ant.apache.org Cc: Subject: DO NOT REPLY [Bug 23143] New: - FTP put (with chmod set) from Windows-to-UNIX: wrong separator X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . 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