Skip to content

Commit

Permalink
Fix windows absolute path check
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Nov 18, 2011
1 parent 4b5f0d5 commit 8247e09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/sprockets/base.rb
Expand Up @@ -149,7 +149,7 @@ def find_asset(path, options = {})
logical_path = path
pathname = Pathname.new(path)

if pathname.to_s =~ /^\//
if pathname.absolute?
return unless stat(pathname)
logical_path = attributes_for(pathname).logical_path
else
Expand Down
2 changes: 1 addition & 1 deletion lib/sprockets/context.rb
Expand Up @@ -78,7 +78,7 @@ def resolve(path, options = {}, &block)
pathname = Pathname.new(path)
attributes = environment.attributes_for(pathname)

if pathname.to_s =~ /^\//
if pathname.absolute?
pathname

elsif content_type = options[:content_type]
Expand Down

0 comments on commit 8247e09

Please sign in to comment.