diff options
author | Masamichi Hosoda <trueroad@trueroad.jp> | 2015-05-04 18:59:44 +0900 |
---|---|---|
committer | Masamichi Hosoda <trueroad@trueroad.jp> | 2015-05-04 18:59:44 +0900 |
commit | b55fea3dab2f12162a072e8071d03c8e35a1e1f6 (patch) | |
tree | 89df052489784aa03211841d7dfd0c7b8b8f8025 /scripts | |
parent | 638ccfde1bf3069ab320beacbb734bed1494f3fa (diff) |
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.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lilypond-invoke-editor.scm | 9 |
1 files 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 |