]> wimlib.net Git - wimlib/blobdiff - src/add_image.c
Update timestamp code; use utimensat()
[wimlib] / src / add_image.c
index 8af2b0728fff2e016226dccba72e6ce5daac2926..67a354e4b27b0e3424f020de322a0d22adfc1a3f 100644 (file)
@@ -44,7 +44,7 @@
 #include <unistd.h>
 
 #ifdef HAVE_ALLOCA_H
-#include <alloca.h>
+#  include <alloca.h>
 #endif
 
 /*
@@ -226,9 +226,9 @@ static int unix_build_dentry_tree(struct wim_dentry **root_ret,
        inode = root->d_inode;
 
 #ifdef HAVE_STAT_NANOSECOND_PRECISION
-       inode->i_creation_time = timespec_to_wim_timestamp(&root_stbuf.st_mtim);
-       inode->i_last_write_time = timespec_to_wim_timestamp(&root_stbuf.st_mtim);
-       inode->i_last_access_time = timespec_to_wim_timestamp(&root_stbuf.st_atim);
+       inode->i_creation_time = timespec_to_wim_timestamp(root_stbuf.st_mtim);
+       inode->i_last_write_time = timespec_to_wim_timestamp(root_stbuf.st_mtim);
+       inode->i_last_access_time = timespec_to_wim_timestamp(root_stbuf.st_atim);
 #else
        inode->i_creation_time = unix_timestamp_to_wim(root_stbuf.st_mtime);
        inode->i_last_write_time = unix_timestamp_to_wim(root_stbuf.st_mtime);
@@ -598,6 +598,8 @@ static bool match_pattern(const char *path, const char *path_basename,
                                string = path_basename;
                }
 
+               /* Warning: on Windows native builds, fnmatch() calls the
+                * replacement function in win32.c. */
                if (fnmatch(pat, string, FNM_PATHNAME
                                #ifdef FNM_CASEFOLD
                                        | FNM_CASEFOLD