class Sass::Engine
def self.find_file_to_import(filename, load_paths)
def self.find_file_to_import(filename, load_paths) was_sass = false original_filename = filename if filename[-5..-1] == ".sass" filename = filename[0...-5] was_sass = true elsif filename[-4..-1] == ".css" return filename end new_filename = find_full_path("#{filename}.sass", load_paths) if new_filename.nil? if was_sass raise Exception.new("File to import not found or unreadable: #{original_filename}.") else return filename + '.css' end else new_filename end end