lib/snapsync/sync_all.rb in snapsync-0.1.6 vs lib/snapsync/sync_all.rb in snapsync-0.1.7
- old
+ new
@@ -38,16 +38,16 @@
SnapperConfig.each_in_dir(config_dir) do |config|
dir = target_dir + config.name
if !dir.exist?
Snapsync.warn "no directory for configuration #{config.name} in #{target_dir}"
else
- yield(LocalTarget.new(dir))
+ yield(config, LocalTarget.new(dir))
end
end
end
def run
- each_target do |target|
+ each_target do |config, target|
if !target.enabled?
Snapsync.warn "not synchronizing to #{target.dir}, it is disabled"
next
end
Sync.new(config, target, autoclean: autoclean?).run