From: Wilbert Berendsen Date: Wed, 11 Jun 2008 21:46:27 +0000 (+0200) Subject: Preventing LilyPond to delete PDF files on *nix systems X-Git-Tag: release/2.11.49-1~1^2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a9e8ac82c2881781ef5f58ffab9a763796f1c4d5;p=lilypond.git 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. --- 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")