Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't complain about not setting times on directories
[rsync/rsync.git]
/
rsync.c
diff --git
a/rsync.c
b/rsync.c
index
13c5f21
..
230d11f
100644
(file)
--- a/
rsync.c
+++ b/
rsync.c
@@
-133,11
+133,15
@@
int set_perms(char *fname,struct file_struct *file,STRUCT_STAT *st,
if (preserve_times && !S_ISLNK(st->st_mode) &&
st->st_mtime != file->modtime) {
if (preserve_times && !S_ISLNK(st->st_mode) &&
st->st_mtime != file->modtime) {
- updated = 1;
- if (set_modtime(fname,file->modtime) != 0) {
+ /* don't complain about not setting times on directories
+ because some filesystems can't do it */
+ if (set_modtime(fname,file->modtime) != 0 &&
+ !S_ISDIR(st->st_mode)) {
rprintf(FERROR,"failed to set times on %s : %s\n",
fname,strerror(errno));
return 0;
rprintf(FERROR,"failed to set times on %s : %s\n",
fname,strerror(errno));
return 0;
+ } else {
+ updated = 1;
}
}
}
}