# File lib/sup/source.rb, line 220
  def save_sources fn=Redwood::SOURCE_FN
    @source_mutex.synchronize do
      if @sources_dirty || @sources.any? { |id, s| s.dirty? }
        bakfn = fn + ".bak"
        if File.exists? fn
          File.chmod 0600, fn
          FileUtils.mv fn, bakfn, :force => true unless File.exists?(bakfn) && File.size(fn) == 0
        end
        Redwood::save_yaml_obj sources, fn, true
        File.chmod 0600, fn
      end
      @sources_dirty = false
    end
  end