From 101109e78502e1913a21d0bdff5dd14112849afb Mon Sep 17 00:00:00 2001 From: sperber Date: Thu, 16 Jan 2003 10:18:22 +0000 Subject: [PATCH] Fix FTP-SIZE to read reply until the end of the string. --- scheme/lib/ftp.scm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scheme/lib/ftp.scm b/scheme/lib/ftp.scm index 55504ec..8abe4e9 100644 --- a/scheme/lib/ftp.scm +++ b/scheme/lib/ftp.scm @@ -206,9 +206,8 @@ (define (ftp-size connection file) (let* ((reply (ftp-send-command connection (format #f "SIZE ~a" file)))) - (and (string? reply) - (string->number (substring reply - 4 (- (string-length reply) 1)))))) + (string->number (substring reply + 4 (string-length reply))))) ;; Abort the current data transfer. Maybe we should close the data ;; socket?