Patch to fix tar directory access time changes under cygwin

Steven Hartland killing@multiplay.co.uk
Thu Sep 27 13:49:00 GMT 2012


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



More information about the Cygwin mailing list