Bug 52646

Summary: Copy task doesn't preserve the last modified time on directories
Product: Ant Reporter: Emmanuel Bourg <ebourg>
Component: Core tasksAssignee: Ant Notifications List <notifications>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 1.8.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Testcase demonstrating the last modified time issue with directories
Patch fixing the last modified date on directories

Description Emmanuel Bourg 2012-02-12 23:01:40 UTC
The <copy> task doesn't not preserve the last modified time on the copied directories when the preservelastmodified attribute it set to true. The copied directories get the current date instead.
Comment 1 Emmanuel Bourg 2012-02-12 23:10:19 UTC
Created attachment 28305 [details]
Testcase demonstrating the last modified time issue with directories
Comment 2 Emmanuel Bourg 2012-02-13 00:20:32 UTC
Created attachment 28306 [details]
Patch fixing the last modified date on directories

Here a suggestion to fix this issue. It only deals with files and file resources. If a mapper is defined it doesn't attempt to set the last modified time on the directories.