From b55fea3dab2f12162a072e8071d03c8e35a1e1f6 Mon Sep 17 00:00:00 2001 From: Masamichi Hosoda Date: Mon, 4 May 2015 18:59:44 +0900 Subject: [PATCH] Fix lilypond-invoke-editor's temp dir Issue 4359 To use environment variable TMP and TEMP is Windows-only conventions. The POSIX convention is to look in the TMPDIR. --- scripts/lilypond-invoke-editor.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/lilypond-invoke-editor.scm b/scripts/lilypond-invoke-editor.scm index 313d6cc8dc..6658f50166 100644 --- a/scripts/lilypond-invoke-editor.scm +++ b/scripts/lilypond-invoke-editor.scm @@ -151,9 +151,12 @@ Options: (if (running-from-gui?) (redirect-port (current-error-port) (open-file (string-append - (or (getenv "TMP") - (getenv "TEMP") - "/tmp") + (if (string-match "^(Windows|CYGWIN)" + (utsname:sysname (uname))) + (or (getenv "TMP") + (getenv "TEMP")) + (or (getenv "TMPDIR") + "/tmp")) "/lilypond-invoke-editor.log") "a"))) (if (not (= (length files) 1)) (begin -- 2.39.2