lib/backup/syncer/rsync/base.rb in backup-3.7.2 vs lib/backup/syncer/rsync/base.rb in backup-3.8.0

- old
+ new

@@ -19,15 +19,19 @@ private ## # Common base command for Local/Push/Pull def rsync_command - utility(:rsync) << ' --archive' << mirror_option << + utility(:rsync) << ' --archive' << mirror_option << exclude_option << " #{ Array(additional_rsync_options).join(' ') }".rstrip end def mirror_option mirror ? ' --delete' : '' + end + + def exclude_option + excludes.map {|pattern| " --exclude='#{ pattern }'" }.join end ## # Each path is expanded, since these refer to local paths and are # being shell-quoted. This will also remove any trailing `/` from