HCoop
/
jackhill
/
guix
/
guix.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70a7a1b
)
accounts: Close database before renaming it.
author
Ludovic Courtès
<ludo@gnu.org>
Wed, 5 Jun 2019 09:12:21 +0000
(11:12 +0200)
committer
Ludovic Courtès
<ludo@gnu.org>
Wed, 5 Jun 2019 21:10:37 +0000
(23:10 +0200)
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'.
gnu/build/accounts.scm
patch
|
blob
|
blame
|
history
diff --git
a/gnu/build/accounts.scm
b/gnu/build/accounts.scm
index
8687446
..
2120c1d
100644
(file)
--- a/
gnu/build/accounts.scm
+++ b/
gnu/build/accounts.scm
@@
-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))))))))