Skip to content

Commit

Permalink
Fix damaged images when creating projects on windows
Browse files Browse the repository at this point in the history
When a project is created on windows and an image is copied to the new 
directory, then the image is damaged because it is not read in binary
mode. 
  • Loading branch information
jok2 committed Oct 7, 2012
1 parent b12238a commit 1105ade
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/compass/actions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ def logger
# copy/process a template in the compass template directory to the project directory.
def copy(from, to, options = nil, binary = false)
options ||= self.options if self.respond_to?(:options)
contents = File.new(from).read
if binary
contents = File.new(from,"rb").read
else
contents = File.new(from).read
end
write_file to, contents, options, binary
end

Expand Down

0 comments on commit 1105ade

Please sign in to comment.