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:
182dca5
)
*** empty log message ***
author
Andrew Tridgell
<tridge@samba.org>
Wed, 26 Jun 1996 13:43:26 +0000
(13:43 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Wed, 26 Jun 1996 13:43:26 +0000
(13:43 +0000)
flist.c
patch
|
blob
|
blame
|
history
diff --git
a/flist.c
b/flist.c
index
4c8d59f
..
dd348c9
100644
(file)
--- a/
flist.c
+++ b/
flist.c
@@
-110,7
+110,10
@@
static void send_file_entry(struct file_struct *file,int f)
}
write_byte(f,flags);
}
write_byte(f,flags);
- write_byte(f,strlen(p));
+ if (flags & SAME_DIR)
+ write_byte(f,strlen(p));
+ else
+ write_int(f,strlen(p));
write_buf(f,p,strlen(p));
write_int(f,(int)file->modtime);
write_int(f,(int)file->length);
write_buf(f,p,strlen(p));
write_int(f,(int)file->modtime);
write_int(f,(int)file->length);
@@
-161,11
+164,13
@@
static void receive_file_entry(struct file_struct *file,
char *p=NULL;
int l1,l2;
char *p=NULL;
int l1,l2;
- l1 = read_byte(f);
- if (flags & SAME_DIR)
+ if (flags & SAME_DIR) {
+ l1 = read_byte(f);
l2 = strlen(lastdir);
l2 = strlen(lastdir);
- else
+ } else {
+ l1 = read_int(f);
l2 = 0;
l2 = 0;
+ }
file->name = (char *)malloc(l1+l2+1);
if (!file->name) out_of_memory("receive_file_entry");
file->name = (char *)malloc(l1+l2+1);
if (!file->name) out_of_memory("receive_file_entry");