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
added msleep() function
[rsync/rsync.git]
/
generator.c
diff --git
a/generator.c
b/generator.c
index
a374849
..
8aa9c06
100644
(file)
--- a/
generator.c
+++ b/
generator.c
@@
-35,6
+35,7
@@
extern int size_only;
extern int io_timeout;
extern int remote_version;
extern int always_checksum;
extern int io_timeout;
extern int remote_version;
extern int always_checksum;
+extern char *compare_dest;
/* choose whether to skip a particular file */
/* choose whether to skip a particular file */
@@
-49,6
+50,15
@@
static int skip_file(char *fname,
of the file time to determine whether to sync */
if (always_checksum && S_ISREG(st->st_mode)) {
char sum[MD4_SUM_LENGTH];
of the file time to determine whether to sync */
if (always_checksum && S_ISREG(st->st_mode)) {
char sum[MD4_SUM_LENGTH];
+ char fnamecmpdest[MAXPATHLEN];
+
+ if (compare_dest != NULL) {
+ if (access(fname, 0) != 0) {
+ slprintf(fnamecmpdest,MAXPATHLEN,"%s/%s",
+ compare_dest,fname);
+ fname = fnamecmpdest;
+ }
+ }
file_checksum(fname,sum,st->st_size);
if (remote_version < 21) {
return (memcmp(sum,file->sum,2) == 0);
file_checksum(fname,sum,st->st_size);
if (remote_version < 21) {
return (memcmp(sum,file->sum,2) == 0);
@@
-246,10
+256,10
@@
void recv_generator(char *fname,struct file_list *flist,int i,int f_out)
return;
}
}
return;
}
}
+ delete_file(fname);
}
}
- delete_file(fname);
if (do_symlink(file->link,fname) != 0) {
if (do_symlink(file->link,fname) != 0) {
- rprintf(FERROR,"link %s -> %s : %s\n",
+ rprintf(FERROR,"
sym
link %s -> %s : %s\n",
fname,file->link,strerror(errno));
} else {
set_perms(fname,file,NULL,0);
fname,file->link,strerror(errno));
} else {
set_perms(fname,file,NULL,0);