Backed out of using File.atomic_write in the asset_tag_helper.rb as its still...

Backed out of using File.atomic_write in the asset_tag_helper.rb as its still half-baked. Most importantly, it creates files with different permissions than File.open/write

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6354 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 d4528eff
......@@ -147,7 +147,7 @@ def javascript_include_tag(*sources)
joined_javascript_path = File.join(JAVASCRIPTS_DIR, joined_javascript_name)
if !File.exists?(joined_javascript_path)
File.atomic_write(joined_javascript_path, File.dirname(joined_javascript_path)) do |cache|
File.open(joined_javascript_path, "w+") do |cache|
javascript_paths = expand_javascript_sources(sources).collect do |source|
compute_public_path(source, 'javascripts', 'js', false)
end
......@@ -242,9 +242,9 @@ def stylesheet_link_tag(*sources)
joined_stylesheet_path = File.join(STYLESHEETS_DIR, joined_stylesheet_name)
if !File.exists?(joined_stylesheet_path)
File.atomic_write(joined_stylesheet_path, File.dirname(joined_stylesheet_path)) do |cache|
File.open(joined_stylesheet_path, "w+") do |cache|
stylesheet_paths = expand_stylesheet_sources(sources).collect do |source|
compute_public_path(source, 'stylesheets', 'css', false)
compute_public_path(source, 'stylesheets', 'css', false)
end
cache.write(join_asset_file_contents(stylesheet_paths))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册