From 5ba7608af08496035d712a71c2beb562f108d43a Mon Sep 17 00:00:00 2001 From: deajan Date: Thu, 12 Feb 2015 10:34:42 +0100 Subject: [PATCH] Prevent exclude pattern globbing --- CHANGELOG.md | 1 + README.md | 2 +- osync.sh | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b40c2bf..8c64197 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ UNDER WORK RECENT CHANGES -------------- +- Prevent exclude pattern globbing before the pattern reaches the rsync cmd - Fixed some missing child pids for time control to work - Prevent creation of a sync-id less log file when DEBUG is set - Added a sequential run batch script that can rerun failed batches diff --git a/README.md b/README.md index b9c9593..ebf77ef 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ osync 0.99RC4 ============= -A two way filesync script with fault tolerance, resuming, deletion backup and conflict backups. +A two way filesync script with fault tolerance, resuming, deletion backup and conflict backups running on linux and virtually any system supporting bash. File synchronization is bidirectional, based on rsync, and can be run manually, by cron, or triggered via inotifytools (whenever a file changes on master, a file sync is triggered). ## About diff --git a/osync.sh b/osync.sh index 4de590c..a685cd5 100755 --- a/osync.sh +++ b/osync.sh @@ -722,6 +722,7 @@ function CheckMinimumSpace function RsyncExcludePattern { + set -f OLD_IFS=$IFS IFS=$PATH_SEPARATOR_CHAR for excludedir in $RSYNC_EXCLUDE_PATTERN @@ -734,6 +735,7 @@ function RsyncExcludePattern fi done IFS=$OLD_IFS + set +f } function RsyncExcludeFrom