diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-10-22 11:45:35 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-10-25 17:54:35 +0100 |
commit | 278720386d3d1cb474eae9c2bc9973be0d77878a (patch) | |
tree | a5149da742177459a7f4013f1d3856afbed1e029 | |
parent | 52eaa2f29da5346fd3d7e66d00fda220a6f9dd01 (diff) |
Handle a blank convert command more explicitly.
-rw-r--r-- | app/controllers/request_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 3296db6b7..428dc4c23 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -876,7 +876,7 @@ class RequestController < ApplicationController Zip::ZipFile.open(file_path, Zip::ZipFile::CREATE) { |zipfile| convert_command = Configuration::html_to_pdf_command done = false - if File.exists?(convert_command) + if !convert_command.blank? && File.exists?(convert_command) url = "http://#{Configuration::domain}#{request_url(info_request)}?print_stylesheet=1" tempfile = Tempfile.new('foihtml2pdf') output = AlaveteliExternalCommand.run(convert_command, url, tempfile.path) |