Changeset 8458 in project


Ignore:
Timestamp:
02/13/08 20:08:58 (11 years ago)
Author:
sjamaan
Message:

Fix 9p:file-read in the situation where a file is smaller than requested

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/3/9p/trunk/9p-client.scm

    r8416 r8458  
    261261               (read (u8vector-length data)))
    262262          (cond
    263            ((zero? read)
    264             (loop 0 total (cons (make-u8vector bytes-left (char->integer #\space)) result))) ; Pad with empty u8vector, just like file-read
     263           ((< read bytes-left)
     264            (loop 0 (+ total read) (cons (make-u8vector bytes-left (char->integer #\space)) (cons data result)))) ; Pad with empty u8vector, just like file-read
    265265           ((> read bytes-left) ; Sometimes the server returns more than we asked for! (when accidentally reading a dir, for example)
    266266            (9p:handle-position-set! h (+ pos bytes-left))
Note: See TracChangeset for help on using the changeset viewer.