Revision: 7228
Author: deton.kih
Date: Thu Jul 21 05:18:34 2011
Log: * scm/fileio.scm
- (file-read-line):
Fix to return last line which does not end with newline.
http://code.google.com/p/uim/source/detail?r=7228
Modified:
/trunk/scm/fileio.scm
=======================================
--- /trunk/scm/fileio.scm Wed Jul 6 18:03:44 2011
+++ /trunk/scm/fileio.scm Thu Jul 21 05:18:34 2011
@@ -165,7 +165,9 @@
(list->string (reverse rest)))
((or (eof-object? c) ;; disconnect?
(not c))
- c)
+ (if (null? rest)
+ c
+ (list->string (reverse rest))))
(else
(loop (file-read-char port) (cons c rest))))))