Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Address handling binary files on windows systems. #144

Open
wants to merge 1 commit into from

1 participant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 1, 2014
  1. @dogshoes
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/rake-pipeline/file_wrapper.rb
View
4 lib/rake-pipeline/file_wrapper.rb
@@ -102,7 +102,7 @@ def exists?
# expected encoding specified in {#encoding}.
def read
contents = if "".respond_to?(:encode)
- File.read(fullpath, :encoding => encoding)
+ File.read(fullpath, :encoding => encoding, :binmode => (encoding.eql? "BINARY"))
else
File.read(fullpath)
end
@@ -126,7 +126,7 @@ def create
FileUtils.mkdir_p(File.dirname(fullpath))
@created_file = if "".respond_to?(:encode)
- File.open(fullpath, "w:#{encoding}")
+ File.open(fullpath, "w:#{encoding}", :binmode => (encoding.eql? "BINARY"))
else
File.open(fullpath, "w")
end
Something went wrong with that request. Please try again.