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
Fixed crash bug that can affect --delete in certain circumstances.
[rsync/rsync.git]
/
flist.c
diff --git
a/flist.c
b/flist.c
index
b1a3538
..
7c39e53
100644
(file)
--- a/
flist.c
+++ b/
flist.c
@@
-542,6
+542,9
@@
void receive_file_entry(struct file_struct **fptr, unsigned short flags,
return;
}
return;
}
+ if (!flist || !flist->count) /* Ignore lastdir when invalid. */
+ lastdir_len = -1;
+
if (flags & XMIT_SAME_NAME)
l1 = read_byte(f);
if (flags & XMIT_SAME_NAME)
l1 = read_byte(f);
@@
-745,7
+748,7
@@
struct file_struct *make_file(char *fname,
char *basename, *dirname, *bp;
unsigned short flags = 0;
char *basename, *dirname, *bp;
unsigned short flags = 0;
- if (!flist
) /* lastdir isn't valid if flist is NULL
*/
+ if (!flist
|| !flist->count) /* Ignore lastdir when invalid.
*/
lastdir_len = -1;
if (strlcpy(thisname, fname, sizeof thisname)
lastdir_len = -1;
if (strlcpy(thisname, fname, sizeof thisname)