Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
89b47d4
)
Don't call utimes() on a dir that doesn't need its mtime changed.
author
Wayne Davison
<wayned@samba.org>
Wed, 5 Mar 2008 06:48:01 +0000
(22:48 -0800)
committer
Wayne Davison
<wayned@samba.org>
Wed, 5 Mar 2008 06:48:01 +0000
(22:48 -0800)
generator.c
patch
|
blob
|
blame
|
history
diff --git
a/generator.c
b/generator.c
index
8e25aec
..
5273201
100644
(file)
--- a/
generator.c
+++ b/
generator.c
@@
-1949,8
+1949,12
@@
static void touch_up_dirs(struct file_list *flist, int ndx)
fname = f_name(file, NULL);
if (!(file->mode & S_IWUSR))
do_chmod(fname, file->mode);
fname = f_name(file, NULL);
if (!(file->mode & S_IWUSR))
do_chmod(fname, file->mode);
- if (need_retouch_dir_times)
- set_modtime(fname, file->modtime, file->mode);
+ if (need_retouch_dir_times) {
+ STRUCT_STAT st;
+ if (link_stat(fname, &st, 0) == 0
+ && cmp_time(st.st_mtime, file->modtime) != 0)
+ set_modtime(fname, file->modtime, file->mode);
+ }
if (allowed_lull && !(counter % lull_mod))
maybe_send_keepalive();
else if (!(counter & 0xFF))
if (allowed_lull && !(counter % lull_mod))
maybe_send_keepalive();
else if (!(counter & 0xFF))