diff options
| author | Wayne Davison <wayned@samba.org> | 2005-01-24 00:51:34 +0000 |
|---|---|---|
| committer | Wayne Davison <wayned@samba.org> | 2005-01-24 00:51:34 +0000 |
| commit | 82471e68a8bb3da8ca95f2b6564c330c52ce891e (patch) | |
| tree | a9a0b2c5d10213bd7851436c6feb6c6311e074da /rsync.c | |
| parent | 20fb7b917572d9d7ee8d537946cafebd2e3633fa (diff) | |
| download | android_external_rsync-82471e68a8bb3da8ca95f2b6564c330c52ce891e.tar.gz android_external_rsync-82471e68a8bb3da8ca95f2b6564c330c52ce891e.tar.bz2 android_external_rsync-82471e68a8bb3da8ca95f2b6564c330c52ce891e.zip | |
Honor the new omit_dir_times var.
Diffstat (limited to 'rsync.c')
| -rw-r--r-- | rsync.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -25,6 +25,7 @@ extern int verbose; extern int dry_run; extern int preserve_times; +extern int omit_dir_times; extern int am_root; extern int am_sender; extern int am_generator; @@ -165,14 +166,12 @@ int set_perms(char *fname,struct file_struct *file,STRUCT_STAT *st, } if (!preserve_times || S_ISLNK(st->st_mode) - || (make_backups && !backup_dir && S_ISDIR(st->st_mode))) + || (S_ISDIR(st->st_mode) + && (omit_dir_times || (make_backups && !backup_dir)))) flags |= PERMS_SKIP_MTIME; if (!(flags & PERMS_SKIP_MTIME) && cmp_modtime(st->st_mtime, 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)) { + if (set_modtime(fname,file->modtime) != 0) { rsyserr(FERROR, errno, "failed to set times on %s", full_fname(fname)); return 0; |
