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 5900] New: - FTP task refuses to delete files in different dir than remotedir if no wildcards are used
Date Thu, 17 Jan 2002 14:21:29 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=5900>.
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=5900

FTP task refuses to delete files in different dir than remotedir if no wildcards are used

           Summary: FTP task refuses to delete files in different dir than
                    remotedir if no wildcards are used
           Product: Ant
           Version: 1.4.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Optional Tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: jela02@handelsbanken.se


the FTP task refuses to delete files when the fileset contains either absolute 
or relative paths. It only works when it contains the filenames alone, and the 
whole path is specified as the remotedir. this makes it impossible to delete 
files which resides in different directories through one task.

if I use **/ as a prefix it works but that's too dangerous since other files 
could possible get deleted aswell. it also takes much longer since the ftp task 
will scan the whole ftp site first...

in order to illustrate this - in the example below only the first target will 
actually delete the file;


<target name="ftp_delete_file">
  <ftp action="del"
       server="${ftp.server}"
       remotedir="${remotedir}/subdir"
       userid="${ftp.user}"
       password="${ftp.pass}">
    <fileset>
      <include name="file"/>
    </fileset>
  </ftp>
</target>

<target name="ftp_delete_path">
  <ftp action="del"
       server="${ftp.server}"
       remotedir="${remotedir}"
       userid="${ftp.user}"
       password="${ftp.pass}">
    <fileset>
      <include name="subdir/file"/>
    </fileset>
  </ftp>
</target>

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


Mime
View raw message