MCPcopy Create free account
hub / github.com/RsyncProject/rsync / unchanged_attrs

Function unchanged_attrs

generator.c:468–509  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

466#endif
467
468int unchanged_attrs(const char *fname, struct file_struct *file, stat_x *sxp)
469{
470 if (S_ISLNK(file->mode)) {
471#ifdef CAN_SET_SYMLINK_TIMES
472 if (preserve_mtimes && !omit_link_times && any_time_differs(sxp, file, fname))
473 return 0;
474#endif
475#ifdef CAN_CHMOD_SYMLINK
476 if (perms_differ(file, sxp))
477 return 0;
478#endif
479#ifdef CAN_CHOWN_SYMLINK
480 if (ownership_differs(file, sxp))
481 return 0;
482#endif
483#if defined SUPPORT_ACLS && 0 /* no current symlink-ACL support */
484 if (acls_differ(fname, file, sxp))
485 return 0;
486#endif
487#if defined SUPPORT_XATTRS && !defined NO_SYMLINK_XATTRS
488 if (xattrs_differ(fname, file, sxp))
489 return 0;
490#endif
491 } else {
492 if (preserve_mtimes && any_time_differs(sxp, file, fname))
493 return 0;
494 if (perms_differ(file, sxp))
495 return 0;
496 if (ownership_differs(file, sxp))
497 return 0;
498#ifdef SUPPORT_ACLS
499 if (acls_differ(fname, file, sxp))
500 return 0;
501#endif
502#ifdef SUPPORT_XATTRS
503 if (xattrs_differ(fname, file, sxp))
504 return 0;
505#endif
506 }
507
508 return 1;
509}
510
511void itemize(const char *fnamecmp, struct file_struct *file, int ndx, int statret,
512 stat_x *sxp, int32 iflags, uchar fnamecmp_type,

Callers 4

hard_link_checkFunction · 0.85
try_dests_regFunction · 0.85
try_dests_nonFunction · 0.85
recv_generatorFunction · 0.85

Calls 5

any_time_differsFunction · 0.85
perms_differFunction · 0.85
ownership_differsFunction · 0.85
acls_differFunction · 0.85
xattrs_differFunction · 0.85

Tested by

no test coverage detected