aboutsummaryrefslogtreecommitdiffstats
path: root/flist.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2006-08-26 16:02:17 +0000
committerWayne Davison <wayned@samba.org>2006-08-26 16:02:17 +0000
commit8c449e62853b141799a80045820b4d07653cefd0 (patch)
tree043a427eb23e97f4c8540c73d3335b69c2db0849 /flist.c
parent29930a9fd263792559958b35db93914d69cffeb1 (diff)
downloadandroid_external_rsync-8c449e62853b141799a80045820b4d07653cefd0.tar.gz
android_external_rsync-8c449e62853b141799a80045820b4d07653cefd0.tar.bz2
android_external_rsync-8c449e62853b141799a80045820b4d07653cefd0.zip
When we're cleaning up a path of "/" in relative mode, we must make
the name "/." (as it was of old) so that there is a filename for us to send. Fixes a problem with --delete --relative when copying from the root (/) of the filesystem.
Diffstat (limited to 'flist.c')
-rw-r--r--flist.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/flist.c b/flist.c
index 6bbf3224..979090e7 100644
--- a/flist.c
+++ b/flist.c
@@ -1185,6 +1185,8 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
} else
break;
}
+ if (len == 1 && fn[0] == '/')
+ fn[len++] = '.';
fn[len] = '\0';
/* Reject a ".." dir in the active part of the path. */
for (p = fn; (p = strstr(p, "..")) != NULL; p += 2) {