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:
ba5e128
)
strip any leading / off absolute paths when using relative path names
author
Andrew Tridgell
<tridge@samba.org>
Mon, 18 May 1998 14:11:43 +0000
(14:11 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Mon, 18 May 1998 14:11:43 +0000
(14:11 +0000)
flist.c
patch
|
blob
|
blame
|
history
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);
+ 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;