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 a README.rsync to explain what we have changed in zlib and to
[rsync/rsync.git]
/
flist.c
diff --git
a/flist.c
b/flist.c
index
cf40151
..
d3c07ed
100644
(file)
--- a/
flist.c
+++ b/
flist.c
@@
-262,6
+262,12
@@
static void receive_file_entry(struct file_struct **fptr,
clean_fname(thisname);
clean_fname(thisname);
+ if (relative_paths && thisname[0] == '/') {
+ /* strip / off absolute paths in destination */
+ memmove(thisname, thisname+1, strlen(thisname));
+ if (!thisname[0]) strcpy(thisname,".");
+ }
+
if ((p = strrchr(thisname,'/'))) {
static char *lastdir;
*p = 0;
if ((p = strrchr(thisname,'/'))) {
static char *lastdir;
*p = 0;