From b68162fd8e5a240b921025d39c158f318afb4cd2 Mon Sep 17 00:00:00 2001 From: deajan Date: Tue, 15 Nov 2016 13:25:35 +0100 Subject: [PATCH] More accurate syncattr skip check --- dev/n_osync.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dev/n_osync.sh b/dev/n_osync.sh index 8b88157..c0a177f 100755 --- a/dev/n_osync.sh +++ b/dev/n_osync.sh @@ -4,7 +4,7 @@ PROGRAM="osync" # Rsync based two way sync engine with fault tolerance AUTHOR="(C) 2013-2016 by Orsiris de Jong" CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr" PROGRAM_VERSION=1.2-beta2 -PROGRAM_BUILD=2016111502 +PROGRAM_BUILD=2016111503 IS_STABLE=no # Execution order #__WITH_PARANOIA_DEBUG @@ -1422,8 +1422,7 @@ function Sync { ## Step 2 if [ "$resumeInitiator" == "${SYNC_ACTION[2]}" ] || [ "$resumeTarget" == "${SYNC_ACTION[2]}" ]; then - #TODO(high) only -X and -A (xattr & acl) should trigger this - if [ "$RSYNC_ATTR_ARGS" != "" ]; then + if [[ "$RSYNC_ATTR_ARGS" == *"-X"* ]] || [[ "$RSYNC_ATTR_ARGS" == *"-A"* ]]; then syncAttrs "${INITIATOR[$__replicaDir]}" "$TARGET_SYNC_DIR" WaitForTaskCompletion $! $SOFT_MAX_EXEC_TIME $HARD_MAX_EXEC_TIME ${FUNCNAME[0]} false $KEEP_LOGGING if [ $? != 0 ]; then