One place that was testing errno for ENOTEMPTY was failing to
authorWayne Davison <wayned@samba.org>
Thu, 19 May 2005 00:00:28 +0000 (00:00 +0000)
committerWayne Davison <wayned@samba.org>
Thu, 19 May 2005 00:00:28 +0000 (00:00 +0000)
also test for EEXIST (which is returned by some OSes).

generator.c

index deefff4..e46da84 100644 (file)
@@ -186,7 +186,7 @@ static int delete_item(char *fname, int mode, int flags)
        if (do_rmdir(fname) == 0) {
                if (!(flags & DEL_TERSE))
                        log_delete(fname, mode);
-       } else if (errno != ENOTEMPTY && errno != ENOENT) {
+       } else if (errno != ENOTEMPTY && errno != EEXIST && errno != ENOENT) {
                rsyserr(FERROR, errno, "delete_file: rmdir %s failed",
                        full_fname(fname));
                return -1;