Handle the case where the there is not relative path to the images directory.

This commit is contained in:
Chris Eppstein 2011-09-19 09:03:02 -07:00
parent b5ca89425d
commit bfcff75c32

View File

@ -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