Bug 52646 - Copy task doesn't preserve the last modified time on directories
Summary: Copy task doesn't preserve the last modified time on directories
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.8.2
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-12 23:01 UTC by Emmanuel Bourg
Modified: 2012-02-13 00:20 UTC (History)
0 users



Attachments
Testcase demonstrating the last modified time issue with directories (2.40 KB, patch)
2012-02-12 23:10 UTC, Emmanuel Bourg
Details | Diff
Patch fixing the last modified date on directories (2.45 KB, patch)
2012-02-13 00:20 UTC, Emmanuel Bourg
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.