diff --git a/app/models/dunlop/source_file_model.rb b/app/models/dunlop/source_file_model.rb index b5f4fca..4b0a298 100644 --- a/app/models/dunlop/source_file_model.rb +++ b/app/models/dunlop/source_file_model.rb @@ -62,7 +62,6 @@ module Dunlop::SourceFileModel def pre_process_working_file(target_path = working_file.path) Dunlop::FileSed.fix_line_endings(target_path) - Dunlop::FileSed.in_place(target_path, %Q{s/"//g}) end def load_source_records diff --git a/app/services/dunlop/file_zip.rb b/app/services/dunlop/file_zip.rb index 4567bbc..8f66cef 100644 --- a/app/services/dunlop/file_zip.rb +++ b/app/services/dunlop/file_zip.rb @@ -3,7 +3,7 @@ module Dunlop::FileZip def self.unzip(zipped_filename, unzipped_filename) case self.mime_type(zipped_filename) when "application/zip" - if zipped_filename.end_with?('.xlsx') # .xlsx IS a zipfile + if zipped_filename.to_s.end_with?('.xlsx') # .xlsx IS a zipfile # .to_s is because it can be a Pathname %x[ cp #{zipped_filename} #{unzipped_filename} ] else %x[ unzip -p #{zipped_filename} > #{unzipped_filename} ]