1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

gpgscm: Make it possible to set the logfile name.

* tests/gpgscm/tests.scm (test): Only set the default log filename
when it has not been set before.

Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2017-05-11 14:44:33 +02:00
parent 3a8c94e522
commit 29ef34cc4c
No known key found for this signature in database
GPG Key ID: DD1A52F9DA8C9020

View File

@ -615,7 +615,7 @@
(current-environment))
;; The log is written here.
(define log-file-name "not set")
(define log-file-name #f)
;; Record time stamps.
(define timestamp #f)
@ -629,7 +629,8 @@
(set! end-time (get-time)))
(define (open-log-file)
(set! log-file-name (string-append (basename name) ".log"))
(unless log-file-name
(set! log-file-name (string-append (basename name) ".log")))
(catch '() (unlink log-file-name))
(open log-file-name (logior O_RDWR O_BINARY O_CREAT) #o600))