This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Patch to fix tar directory access time changes under cygwin
- From: "Steven Hartland" <killing at multiplay dot co dot uk>
- To: "Cygwin List" <cygwin at cygwin dot com>
- Date: Thu, 27 Sep 2012 14:40:21 +0100
- Subject: Patch to fix tar directory access time changes under cygwin
The following little patch fixes tar under cygwin not ignoring
directory change times.
Without it a simple tar can easily fail.
--- src/create.c.orig 2011-01-07 10:04:33.297364800 -0800
+++ src/create.c 2011-01-07 09:51:37.804364800 -0800
@@ -1788,7 +1788,7 @@
/* Original ctime will change if the file is a directory and
--remove-files is given */
&& !(remove_files_option && is_dir))
- || original_size < final_stat.st_size)
+ || (!is_dir && original_size != final_stat.st_size))
{
WARNOPT (WARN_FILE_CHANGED,
(0, 0, _("%s: file changed as we read it"),
Would be good if this could be included in the offical port
Regards
Steve
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple