]> git.donarmstrong.com Git - lilypond.git/commitdiff
Preventing LilyPond to delete PDF files on *nix systems
authorWilbert Berendsen <lilykde@xs4all.nl>
Wed, 11 Jun 2008 21:46:27 +0000 (23:46 +0200)
committerValentin Villenave <valentin@villenave.net>
Wed, 11 Jun 2008 21:46:27 +0000 (23:46 +0200)
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

index 8963fe15caf9b344f55ec26cd19a1aba39d0bcfa..c2c89eed77ed71f90a327b2f9b77f502636850c3 100644 (file)
     (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")