Permalink
Browse files

Read files in using binread rather than read. Otherwise binary attach…

…ments such as images get totally screwed.
  • Loading branch information...
petebacondarwin committed Jul 9, 2011
1 parent 26c18d9 commit 1a6969bdd194f3c254d278a243171bb3665ec122
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/soca/pusher.rb
View
@@ -126,7 +126,7 @@ def plugin(plugin_name, options = {})
private
def map_file(path, hash)
- file_data = File.read(path)
+ file_data = File.binread(path)
base_path = path.gsub(app_dir, '')
if map = mapped_directories.detect {|k,v| k =~ base_path }
logger.debug "Matched #{path} against #{map.inspect}"

0 comments on commit 1a6969b

Please sign in to comment.