Viva
Viva

Reputation: 2075

modified files in destination are not updated ant

I have two folders : src and dst. I am using sync in order to have dst as an updated copy of src .

 <?xml version="1.0"?>
 <project name="Hello World Project" default="info">

 <target name="info">

 <sync todir="dest">
  <fileset src="src" />
 </sync>

 </target>

It work perfectly , with one exception. If I modify the content of a file from destination folder , it will not be updated . Why is that and how can I solve it?

Upvotes: 1

Views: 172

Answers (1)

user4524982
user4524982

Reputation:

sync is supposed to ensure dest contains everything from your sources and is up-to-date. If it contains files even newer that inside your sources then those will be retained.

If this is not what you want but you rather prefer to replace changes made in dest you need to set the task's overwrite attribute to true.

Upvotes: 3

Related Questions