From a9e8ac82c2881781ef5f58ffab9a763796f1c4d5 Mon Sep 17 00:00:00 2001 From: Wilbert Berendsen Date: Wed, 11 Jun 2008 23:46:27 +0200 Subject: [PATCH] Preventing LilyPond to delete PDF files on *nix systems The default behaviour was to delete the created PDF files and then create a new file. This method is preserved for MS Windows systems, but for *nix systems this patch allows Lily to keep the existing PDF file and all its attributes, only writing new content inside of it. --- scm/backend-library.scm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scm/backend-library.scm b/scm/backend-library.scm index 8963fe15ca..c2c89eed77 100644 --- a/scm/backend-library.scm +++ b/scm/backend-library.scm @@ -109,10 +109,9 @@ (if (eq? PLATFORM 'windows) (begin (set! cmd (string-regexp-substitute "=" "#" cmd)) - (set! cmd (string-regexp-substitute "-dSAFER " "" cmd)))) - - (if (access? pdf-name W_OK) - (delete-file pdf-name)) + (set! cmd (string-regexp-substitute "-dSAFER " "" cmd)) + (if (access? pdf-name W_OK) + (delete-file pdf-name)))) (ly:message (_ "Converting to `~a'...") pdf-name) (ly:progress "\n") -- 2.39.5