From bfcff75c32be16275dffe0854ef99734b3fe2061 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Mon, 19 Sep 2011 09:03:02 -0700 Subject: [PATCH] Handle the case where the there is not relative path to the images directory. --- lib/compass/sass_extensions/sprites/sprite_methods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compass/sass_extensions/sprites/sprite_methods.rb b/lib/compass/sass_extensions/sprites/sprite_methods.rb index b15477da..bd905247 100644 --- a/lib/compass/sass_extensions/sprites/sprite_methods.rb +++ b/lib/compass/sass_extensions/sprites/sprite_methods.rb @@ -47,7 +47,7 @@ module Compass end def relativize(path) - Pathname.new(path).relative_path_from(Pathname.new(Dir.pwd)).to_s + Pathname.new(path).relative_path_from(Pathname.new(Dir.pwd)).to_s rescue path end # Generate a sprite image if necessary