git.samba.org
/
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
|
history
diff --git
a/flist.c
b/flist.c
index cf4015191040e4d705a9c990fefa5001ad8f7af9..d3c07edc16e506c334667ae4ac4ae19d0a92eb69 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;