Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

test/template/asset_tag_helper_test fails on win32

#1047

compute_public_path is appending a period (.) even when ext is nil.


source += ".#{ext}" if ext && File.extname(source).blank? || File.exist?(File.join(ASSETS_DIR, dir, "#{source}.#{ext}"))

Should be


source += ".#{ext}" if ext && (File.extname(source).blank? || File.exist?(File.join(ASSETS_DIR, dir, "#{source}.#{ext}")))

On windows, appending periods (.) to the end of a filename still refers to the same file. So if File.exist?("rails.png") returns true, so will File.exist?("rails.png.") and File.exist?("rails.png.....").

So File.exist?(File.join(ASSETS_DIR, dir, "#{source}.#{ext}"))) will always be true for a file that exists. Nothing should be appended if ext isn't specified.

Reported by Daniel Sheppard · September 15th, 2008 @ 06:24 AM

State: duplicate
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Pratik
    Pratik
    • State changed from new to duplicate
    • Title changed from [PATCH] test/template/asset_tag_helper_test fails on win32 to test/template/asset_tag_helper_test fails on win32

    Please reopen if this is still an issue in Edge.

    Also check http://rails.lighthouseapp.com/p... for submitting patches :)

    Thanks.

    December 19th, 2008 @ 02:35 PM