Handle a link_stat() failure with errno ENOENT as a vanished file.
[rsync/rsync.git] / xattrs.c
index 85341b3..0eb7323 100644 (file)
--- a/xattrs.c
+++ b/xattrs.c
@@ -3,7 +3,7 @@
  * Written by Jay Fenlason, vaguely based on the ACLs patch.
  *
  * Copyright (C) 2004 Red Hat, Inc.
- * Copyright (C) 2006-2008 Wayne Davison
+ * Copyright (C) 2006-2009 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
@@ -210,7 +210,7 @@ static int rsync_xal_get(const char *fname, item_list *xalp)
        size_t datum_len, name_offset;
        char *name, *ptr;
 #ifdef HAVE_LINUX_XATTRS
-       int user_only = am_sender ? 0 : !am_root;
+       int user_only = am_sender ? 0 : am_root <= 0;
 #endif
        rsync_xa *rxa;
        int count;
@@ -294,7 +294,7 @@ int copy_xattrs(const char *source, const char *dest)
        size_t datum_len;
        char *name, *ptr;
 #ifdef HAVE_LINUX_XATTRS
-       int user_only = am_sender ? 0 : am_root <= 0;
+       int user_only = am_root <= 0;
 #endif
 
        /* This puts the name list into the "namebuf" buffer. */