Fixed a problem with checking for the '.' dir in the first file
authorWayne Davison <wayned@samba.org>
Sat, 2 Aug 2008 02:00:21 +0000 (19:00 -0700)
committerWayne Davison <wayned@samba.org>
Sat, 2 Aug 2008 02:00:21 +0000 (19:00 -0700)
list that is transferred.  This fixes a glitch where a failed
--iconv conversion on the receiving side could prevent deletions
from happening in the root-dir of the transfer.

NEWS
flist.c

diff --git a/NEWS b/NEWS
index 12e45e8..8e749b8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,9 @@ Changes since 3.0.3:
     - Improved the keep-alive check in the generator to fire consistently in
       incremental-recursion mode when --timeout is enabled.
 
+    - When using --iconv, if a filename fails to convert on the receiving side,
+      this no longer interferes with deletions in the root-dir of the transfer.
+
     - Fixed a potential alignment issue in the IRIX ACL code when allocating
       the initial "struct acl" object.  Also, cast mallocs to avoid warnings.
 
diff --git a/flist.c b/flist.c
index 2c45cc6..0cffa96 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -2164,7 +2164,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
        if (inc_recurse) {
                send_dir_depth = 1;
                add_dirs_to_tree(-1, flist, dir_count);
-               if (!file_total || strcmp(flist->sorted[0]->basename, ".") != 0) 
+               if (!file_total || strcmp(flist->sorted[flist->low]->basename, ".") != 0)
                        flist->parent_ndx = -1;
                flist_done_allocating(flist);
                if (send_dir_ndx < 0) {
@@ -2288,7 +2288,7 @@ struct file_list *recv_file_list(int f)
                else
                        io_error |= read_int(f);
        } else if (inc_recurse && flist->ndx_start == 1) {
-               if (!file_total || strcmp(flist->sorted[0]->basename, ".") != 0) 
+               if (!file_total || strcmp(flist->sorted[flist->low]->basename, ".") != 0)
                        flist->parent_ndx = -1;
        }