>From 3c0c370da97c5204dc72cfbec496e3a48312b137 Mon Sep 17 00:00:00 2001 From: Christian Kellermann Date: Wed, 25 Apr 2012 15:16:32 +0200 Subject: [PATCH] Use binary mode when downloading files Bugfix for #820 --- setup-download.scm | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/setup-download.scm b/setup-download.scm index ec94ac3..88b9e37 100644 --- a/setup-download.scm +++ b/setup-download.scm @@ -370,8 +370,11 @@ (else (d " ~a~%" name) (let* ((size (read ins)) - (data (read-string size in)) ) - (with-output-to-file (make-pathname dest name) (cut display data) ) ) + (data (read-string size in)) + (fname (make-pathname dest name)) + (fd (file-open fname (+ open/binary open/creat open/write)))) + (file-write fd data) + (file-close fd)) (get-files (cons name files)) ) ) ) ) ))) (define (http-fetch host port locn dest proxy-host proxy-port proxy-user-pass) -- 1.7.5.4