find_source

in resources/asciidoctor/lib/copy_images/copier.rb [47:62]


    def find_source(block, uri)
      to_check = roots_to_check block
      checked = []

      while (dir = to_check.shift)
        checked << block.normalize_system_path(uri, dir)
        return checked.last if File.readable? checked.last
        next unless Dir.exist?(dir)

        to_check += subdirs(dir)
      end

      log_missing block, checked, uri
      nil
    end