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=25770>. 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=25770 FixCRLF "preserveLastModified" ------- Additional Comments From [EMAIL PROTECTED] 2003-12-29 16:04 ------- for clarity, i wasn't suggesting breaking backwards compatability but rather introducing a new use case... preserveLastModified; attribute[optional]::boolean; default = 'false' [example patch - note: it's tiny, but does FileUtils.setFileLastModified need the synchronized Java1.1 workaround anymore?] Index: FixCRLF.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java,v retrieving revision 1.54.2.1 diff -u -r1.54.2.1 FixCRLF.java --- FixCRLF.java 14 Oct 2003 13:20:11 -0000 1.54.2.1 +++ FixCRLF.java 29 Dec 2003 15:47:06 -0000 @@ -157,6 +157,8 @@ private File srcDir; private File destDir = null; + + private boolean preserveLastModified = false; private FileUtils fileUtils = FileUtils.newFileUtils(); @@ -329,6 +331,14 @@ ctrlz = ADD; } } + + /** + * Specifies whether Ant should preserve the lastModified timestamp + * on any modified files. + */ + public void setPreserveLastModified(boolean preserve) { + this.preserveLastModified = preserve; + } /** * Specifies the encoding Ant expects the files to be in - @@ -566,6 +576,9 @@ if (destIsWrong) { fileUtils.rename(tmpFile, destFile); + if (this.preserveLastModified) { + destFile.setLastModified(srcFile.lastModified()); + } tmpFile = null; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]