diff --git a/lib/compass/actions.rb b/lib/compass/actions.rb index a853ee40..357ae6c7 100644 --- a/lib/compass/actions.rb +++ b/lib/compass/actions.rb @@ -33,7 +33,7 @@ module Compass msg = "#{basename(dir)} already exists and is not a directory." raise Compass::FilesystemConflict.new(msg) else - logger.record :directory, basename(dir) + logger.record :directory, separate("#{basename(dir)}/") FileUtils.mkdir_p(dir) unless options[:dry_run] end end @@ -94,5 +94,10 @@ module Compass path.gsub(%r{/}, File::SEPARATOR) end + # Removes the trailing separator, if any, from a path. + def strip_trailing_separator(path) + (path[-1..-1] == File::SEPARATOR) ? path[0..-2] : path + end + end end \ No newline at end of file diff --git a/lib/compass/commands/project_base.rb b/lib/compass/commands/project_base.rb index 96350820..887559a8 100644 --- a/lib/compass/commands/project_base.rb +++ b/lib/compass/commands/project_base.rb @@ -69,9 +69,6 @@ module Compass path.index(File::SEPARATOR) == 0 end - def strip_trailing_separator(path) - (path[-1..-1] == File::SEPARATOR) ? path[0..-2] : path - end end end end \ No newline at end of file diff --git a/lib/compass/installers/base.rb b/lib/compass/installers/base.rb index 8fcafc83..16439df9 100644 --- a/lib/compass/installers/base.rb +++ b/lib/compass/installers/base.rb @@ -107,13 +107,13 @@ module Compass # returns an absolute path given a path relative to the current installation target. # Paths can use unix style "/" and will be corrected for the current platform. def targetize(path) - File.join(target_path, separate(path)) + strip_trailing_separator File.join(target_path, separate(path)) end # returns an absolute path given a path relative to the current template. # Paths can use unix style "/" and will be corrected for the current platform. def templatize(path) - File.join(template_path, separate(path)) + strip_trailing_separator File.join(template_path, separate(path)) end def stylesheet_links