whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: Fail earlier if PDF conversion fails
Date Thu, 01 Nov 2018 20:58:47 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new beb2247  Fail earlier if PDF conversion fails
beb2247 is described below

commit beb224702f3991b2adcb699ad58f5e60e5d1a5a3
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Thu Nov 1 16:56:46 2018 -0400

    Fail earlier if PDF conversion fails
---
 www/secretary/workbench/models/attachment.rb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/www/secretary/workbench/models/attachment.rb b/www/secretary/workbench/models/attachment.rb
index b95771b..e860b7c 100644
--- a/www/secretary/workbench/models/attachment.rb
+++ b/www/secretary/workbench/models/attachment.rb
@@ -64,6 +64,7 @@ class Attachment
       img2pdf = File.expand_path('../img2pdf', __dir__.untaint).untaint
       system img2pdf, '--output', pdf.path, file.path
       file.unlink
+      raise "Failed to convert #{self.name} to PDF" unless File.sise? pdf.path
       return pdf
     end
 


Mime
View raw message