diff --git a/guix/serialization.scm b/guix/serialization.scm index 64eacf9..d3bdea3 100644 --- a/guix/serialization.scm +++ b/guix/serialization.scm @@ -292,19 +292,21 @@ Restore it as FILE." (define (read-eof-marker) (match (read-string port) (")" #t) - (x (raise + (x + (pk 'bad-eof x) + (raise (condition (&message (message "invalid nar end-of-file marker")) (&nar-read-error (port port) (file file) (token x))))))) (match (list (read-string port) (read-string port) (read-string port)) (("(" "type" "regular") - (call-with-output-file file (cut read-contents port <>)) + (call-with-output-file (pk 'reg file) (cut read-contents port <>)) (read-eof-marker)) (("(" "type" "symlink") (match (list (read-string port) (read-string port)) (("target" target) - (symlink target file) + (symlink target (pk 'symlink file)) (read-eof-marker)) (x (raise (condition @@ -312,7 +314,7 @@ Restore it as FILE." (&nar-read-error (port port) (file file) (token x))))))) (("(" "type" "directory") (let ((dir file)) - (mkdir dir) + (mkdir (pk 'dir dir)) (let loop ((prefix (read-string port))) (match prefix ("entry"