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:
parent
3a8c94e522
commit
29ef34cc4c
@ -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))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user