ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carbon <...@rack.shacknet.nu>
Subject FTP & Directories
Date Sun, 21 Jan 2001 22:18:23 GMT
The FTP task seems to work well when transferring entire subdirectories,
but it has trouble when parts of the directory structure already exist.
For example, if I have a local directory structure like this:

DirA
|
+-DirB
  |
  |-file1
  |-file2

And I run the following target:

   <ftp
    server="${SERVER}"
    userid="${USERID}"
    password="${PASSWORD}"
    remotedir="{~/${USERID}/A"
    verbose="yes"
    depends="yes">
    <fileset dir="${USERID}/A"/>
   </ftp>

Then the structure is created on the remote machine and the files are
transferred. Now, if I 'touch' file2 or file2 and run the target again
I get the following error:

      [ftp] sending files
      [ftp] transferring [OMITTED]/A/B/file1

BUILD FAILED

build.xml:[LINENUM]: could not create directory: 521
"[OMITTED]/A/B" directory exists

So, it seems that the task needs to check for the existence of the
directory ahead of time, or ignore such an error. I'm not sure what the
best approach would be.

Thanks,

Alanis S. Sinala


Mime
View raw message