Fix --remove-source-files sanity check w/--copy-links the right way.
[rsync.git] / acls.c
diff --git a/acls.c b/acls.c
index 3f277b8e93802a2c8ad6ab8fc94a5bd3892785c2..7351ad687385ce744ea93481b4db89054fce219a 100644 (file)
--- a/acls.c
+++ b/acls.c
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 1996 Andrew Tridgell
  * Copyright (C) 1996 Paul Mackerras
- * Copyright (C) 2006-2013 Wayne Davison
+ * Copyright (C) 2006-2018 Wayne Davison
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -1117,14 +1117,12 @@ int default_perms_for_dir(const char *dir)
                case ENOSYS:
                        /* No ACLs are available. */
                        break;
-               case ENOENT:
-                       if (dry_run) {
+               default:
+                       if (dry_run && errno == ENOENT) {
                                /* We're doing a dry run, so the containing directory
                                 * wasn't actually created.  Don't worry about it. */
                                break;
                        }
-                       /* Otherwise fall through. */
-               default:
                        rprintf(FWARNING,
                                "default_perms_for_dir: sys_acl_get_file(%s, %s): %s, falling back on umask\n",
                                dir, str_acl_type(SMB_ACL_TYPE_DEFAULT), strerror(errno));