commit bf0887d8dedb30af2ab4bfd50ccc931b21c297a4
parent f27661b1656ae1f0d28fd89595b5a16f268d8d3d
Author: Eric Weikl <eric.weikl@gmx.net>
Date: Thu, 10 Oct 2013 14:28:29 +0200
Handle missing sync-back-ok
If a user skips syncback, the file sync-back-ok is never created. If it's
missing, skip checking each source separately in check_syncback_settings.
Fixes #158
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/sup.rb b/lib/sup.rb
@@ -196,6 +196,8 @@ EOS
end
def check_syncback_settings
+ # don't check if syncback was never performed
+ return unless File.exists? Redwood::SYNC_OK_FN
active_sync_sources = File.readlines(Redwood::SYNC_OK_FN).collect { |s| s.strip }
return if active_sync_sources.length == 1 and active_sync_sources[0] == Redwood::MAILDIR_SYNC_CHECK_SKIPPED
sources = SourceManager.sources