lib/capcode/render/haml.rb in Capcode-0.7.1 vs lib/capcode/render/haml.rb in Capcode-0.8.0
- old
+ new
@@ -12,15 +12,15 @@
if f.include? '..'
return [403, {}, '403 - Invalid path']
end
if /Windows/.match( ENV['OS'] )
- unless( /.:\\/.match( @@__ERB_PATH__[0] ) )
- @@__HAML_PATH__ = File.expand_path( File.join(@@__ROOT_DIRECTORY, @@__HAML_PATH__) )
+ unless( /.:\\/.match( @@__HAML_PATH__[0] ) )
+ @@__HAML_PATH__ = File.expand_path( File.join(".", @@__HAML_PATH__) )
end
else
unless( @@__HAML_PATH__[0].chr == "/" )
- @@__HAML_PATH__ = File.expand_path( File.join(@@__ROOT_DIRECTORY, @@__HAML_PATH__) )
+ @@__HAML_PATH__ = File.expand_path( File.join(".", @@__HAML_PATH__) )
end
end
layout = opts.delete(:layout)||:layout
layout_file = File.join( @@__HAML_PATH__, layout.to_s+".haml" )
\ No newline at end of file