From: Patrick McCarty Date: Tue, 14 Sep 2010 23:13:23 +0000 (-0700) Subject: Fix #1186. X-Git-Tag: release/2.13.34-1~15 X-Git-Url: https://git.donarmstrong.com/lilypond.git?a=commitdiff_plain;h=5158cad47176cbddaf0e78b11119dfe689a19c66;p=lilypond.git Fix #1186. Checking the page count to detect EPS files is faulty, since it is legal to specify "%%Pages: 1". This commit revises the conditional statement to use a file-extension check (for ".eps") instead. This was a regression introduced by commit 1f8c40c86902c6c98091ccfd3ecf02ec1fc2bed5 --- diff --git a/scm/ps-to-png.scm b/scm/ps-to-png.scm index cbe6d23e4b..5019241169 100644 --- a/scm/ps-to-png.scm +++ b/scm/ps-to-png.scm @@ -124,8 +124,7 @@ (output-file (if multi-page? pngn png1)) (gs-variable-options - ;; ps-page-count returns 0 for EPS files - (if (zero? page-count) + (if (string-suffix-ci? ".eps" ps-name) "-dEPSCrop" (format #f "-dDEVICEWIDTHPOINTS=~,2f -dDEVICEHEIGHTPOINTS=~,2f" page-width page-height)))