Allow opendir() in send_directory() to fail with ENOENT.
authorWayne Davison <wayned@samba.org>
Sat, 27 Dec 2008 19:07:57 +0000 (11:07 -0800)
committerWayne Davison <wayned@samba.org>
Sat, 27 Dec 2008 19:22:02 +0000 (11:22 -0800)
NEWS
flist.c

diff --git a/NEWS b/NEWS
index cf19e2939babd71f59478a2d22562a4d0a1715f8..e7140951f876305b2cce59edb4965c0c310390d8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -42,6 +42,9 @@ Changes since 3.0.4:
     - Fixed a bug when using --sparse on a sparse file that has over 2GB of
       consecutive sparse data.
 
+    - Fixed a problem with --delete-delay reporting an error when it was ready
+      to remove a directory that was now gone.
+
     - Got rid of a bunch of "warn_unused_result" compiler warnings.
 
     - If an ftruncate() on a received file fails, it now causes a partial-
diff --git a/flist.c b/flist.c
index d105422ef2081ed455e73ad919aea561eb26e3ba..83ce237c6f5390b859f8492a8e99db0cc5838975 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -1597,6 +1597,8 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
        assert(flist != NULL);
 
        if (!(d = opendir(fbuf))) {
+               if (errno == ENOENT)
+                       return;
                io_error |= IOERR_GENERAL;
                rsyserr(FERROR_XFER, errno, "opendir %s failed", full_fname(fbuf));
                return;