accounts: Close database before renaming it.
Fixes <https://bugs.gnu.org/35996>. Reported by Florian Pelz <pelzflorian@pelzflorian.de>. * gnu/build/accounts.scm (database-writer): Move 'close-port' call before 'rename-file'.
This commit is contained in:
parent
70a7a1b5dc
commit
ed8570dce3
@ -249,9 +249,11 @@ to it atomically and set the appropriate permissions."
|
||||
(lambda ()
|
||||
(chmod port mode)
|
||||
(write-entries port)
|
||||
(close-port port)
|
||||
(rename-file template file-or-port))
|
||||
(lambda ()
|
||||
(close-port port)
|
||||
(unless (port-closed? port)
|
||||
(close-port port))
|
||||
(when (file-exists? template)
|
||||
(delete-file template))))))))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user