strip any leading / off absolute paths when using relative path names

This commit is contained in:
Andrew Tridgell committed 1998-05-18 14:11:43 +00:00
1 parent ba5e128d23
commit 130b4ae447
1 file changed
+6
+6
View File
@@ -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;