aboutsummaryrefslogtreecommitdiff
path: root/guix/nar.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/nar.scm')
-rw-r--r--guix/nar.scm9
1 files changed, 5 insertions, 4 deletions
diff --git a/guix/nar.scm b/guix/nar.scm
index 29b57dc989..ea119a25fe 100644
--- a/guix/nar.scm
+++ b/guix/nar.scm
@@ -76,10 +76,11 @@
;; avoid stat'ing like crazy.
(with-fluids ((%file-port-name-canonicalization #f))
(let ((port (open-file file "rb")))
- (catch #t (cut proc port)
- (lambda args
- (close-port port)
- (apply throw args))))))
+ (dynamic-wind
+ (const #t)
+ (cut proc port)
+ (lambda ()
+ (close-port port))))))
(write-string "contents" p)
(write-long-long size p)