DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.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://issues.apache.org/bugzilla/show_bug.cgi?id=25770

[PATCH] FixCRLF "preserveLastModified"





------- Additional Comments From [EMAIL PROTECTED]  2004-04-23 17:08 -------
I think there's a small bug in the proposed patch: FixCRLF can be used to 
overwrite existing files (when no destdir is given). If that is the case then 
the fileUtils.rename(tmpFile,destFile) is actually also overwriting srcFile, 
therefore you can't get the original timestamp anymore because the file is 
gone. I think this will work:
            if (destIsWrong) {
                long modified = srcFile.lastModified();
                fileUtils.rename(tmpFile, destFile);
                if (this.preserveLastModified)
                    destFile.setLastModified(modified);
                tmpFile = null;
            }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to