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
(from parent 1:
d31c09c
)
If the user specifies a trailing slash on the destination, make sure
author
Wayne Davison
<wayned@samba.org>
Thu, 24 Apr 2003 16:14:33 +0000
(16:14 +0000)
committer
Wayne Davison
<wayned@samba.org>
Thu, 24 Apr 2003 16:14:33 +0000
(16:14 +0000)
that we treat it as a directory reference.
main.c
patch
|
blob
|
blame
|
history
diff --git
a/main.c
b/main.c
index
a33f7a7
..
29ee6ad
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-285,6
+285,7
@@
oom:
static char *get_local_name(struct file_list *flist,char *name)
{
STRUCT_STAT st;
+ int len;
extern int orig_umask;
if (verbose > 2)
@@
-310,7
+311,8
@@
static char *get_local_name(struct file_list *flist,char *name)
return name;
}
- if (flist->count <= 1)
+ len = strlen(name);
+ if ((len <= 1 || name[len-1] != '/') && flist->count <= 1)
return name;
if (do_mkdir(name,0777 & ~orig_umask) != 0) {