mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Don't leak a file port when saving reports.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18515 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
fa9f788504
commit
3ca3f9e72f
@ -576,10 +576,9 @@
|
||||
;; #Bug#342206.
|
||||
(save-result (eval-string saved-form)))
|
||||
(if (record? save-result)
|
||||
(begin
|
||||
(display saved-form
|
||||
(open-file conf-file-name "a"))
|
||||
(force-output)
|
||||
(let ((report-port (open-file conf-file-name "a")))
|
||||
(display saved-form report-port)
|
||||
(close report-port)
|
||||
(let ((report-name (gnc:report-name report)))
|
||||
(gnc-info-dialog
|
||||
'()
|
||||
@ -592,11 +591,11 @@
|
||||
))))
|
||||
|
||||
(define (gnc:report-template-save-to-savefile report-template)
|
||||
(let ((conf-file-name gnc:current-saved-reports)
|
||||
(saved-form (gnc:report-template-generate-saved-forms report-template)))
|
||||
(display saved-form
|
||||
(open-file conf-file-name "a"))
|
||||
(force-output)))
|
||||
(let* ((conf-file-name gnc:current-saved-reports)
|
||||
(saved-form (gnc:report-template-generate-saved-forms report-template))
|
||||
(report-port (open-file conf-file-name "a")))
|
||||
(display saved-form report-port)
|
||||
(close report-port)))
|
||||
|
||||
;; save all custom reports, moving the old version of the
|
||||
;; saved-reports file aside as a backup
|
||||
|
Loading…
Reference in New Issue
Block a user