diff --git a/lib/compass/actions.rb b/lib/compass/actions.rb index bc4a2b82..4e924f1b 100644 --- a/lib/compass/actions.rb +++ b/lib/compass/actions.rb @@ -65,7 +65,10 @@ module Compass end def remove(file_name) - if File.exists?(file_name) + if File.directory?(file_name) + FileUtils.rm_rf file_name + log_action :remove, basename(file_name)+"/", options + elsif File.exists?(file_name) File.unlink file_name log_action :remove, basename(file_name), options end diff --git a/lib/compass/commands/update_project.rb b/lib/compass/commands/update_project.rb index d570da2f..30e2654f 100644 --- a/lib/compass/commands/update_project.rb +++ b/lib/compass/commands/update_project.rb @@ -54,6 +54,7 @@ module Compass compiler_opts = {:sass => Compass.sass_engine_options} compiler_opts.merge!(options) compiler_opts[:sass_files] = explicit_sass_files + compiler_opts[:cache_location] = determine_cache_location compiler_opts end diff --git a/lib/compass/compiler.rb b/lib/compass/compiler.rb index 961a4624..606f9406 100644 --- a/lib/compass/compiler.rb +++ b/lib/compass/compiler.rb @@ -75,9 +75,9 @@ module Compass end def clean! - FileUtils.rm_rf options[:cache_location] + remove options[:cache_location] css_files.each do |css_file| - FileUtils.rm_f css_file + remove css_file end end