Index: configure.in.in =================================================================== --- configure.in.in (revision 22969) +++ configure.in.in (working copy) @@ -113,9 +113,9 @@ dnl *** Check for standard functions *** dnl ************************************ AC_FUNC_MMAP() -AC_CHECK_FUNCS([attropen extattr_get_fd fgetxattr getdents lchmod localeconv \ - localtime_r mbrtowc mkdtemp mkfifo posix_madvise pread \ - pwrite readdir_r sched_yield setgroupent setpassent \ +AC_CHECK_FUNCS([attropen extattr_get_fd fgetxattr futimes getdents lchmod \ + localeconv localtime_r mbrtowc mkdtemp mkfifo posix_madvise \ + pread pwrite readdir_r sched_yield setgroupent setpassent \ setpriority statfs statvfs statvfs1 strcoll strlcpy strptime \ symlink]) Index: thunar-vfs/thunar-vfs-io-local-xfer.c =================================================================== --- thunar-vfs/thunar-vfs-io-local-xfer.c (revision 22969) +++ thunar-vfs/thunar-vfs-io-local-xfer.c (working copy) @@ -43,6 +43,9 @@ #ifdef HAVE_SYS_STATVFS_H #include #endif +#ifdef HAVE_SYS_TIME_H +#include +#endif #ifdef HAVE_SYS_VFS_H #include #endif @@ -144,14 +147,17 @@ gpointer callback_data, GError **error) { - mode_t mode; - gchar *display_name; - gchar *buffer; - gsize bufsize; - gsize completed; - gint source_fd; - gint target_fd; - gint n, m, l; +#ifdef HAVE_FUTIMES + struct timeval times[2]; +#endif + mode_t mode; + gchar *display_name; + gchar *buffer; + gsize bufsize; + gsize completed; + gint source_fd; + gint target_fd; + gint n, m, l; /* try to open the source file for reading */ source_fd = g_open (source_absolute_path, O_RDONLY, 0000); @@ -308,6 +314,18 @@ g_free (buffer); } + /* set the access/modification time of the target to that of + * the source: http://bugzilla.xfce.org/show_bug.cgi?id=2244 + */ +#ifdef HAVE_FUTIMES + /* set access and modifications using the source_statb */ + times[0].tv_sec = source_statb->st_atime; times[0].tv_usec = 0; + times[1].tv_sec = source_statb->st_mtime; times[1].tv_usec = 0; + + /* apply the new times to the file (ignoring errors here) */ + futimes (target_fd, times); +#endif + /* close the file descriptors */ close (target_fd); end1: